Julik Tarkhanov
Julik Tarkhanov
Ok, I will need to a bit of refactoring then. What would be the default - "give up" if a file fails and print to the Rails log? This would...
> i think the default would be to remove the file from the list of files to be written at the header at the end and move on to the...
@fringd what could be an option is adding a `rescue` to the `ZipGenerator` so that at the very lease something gets printed to the Rails log?
@ebenenglish This is tricky > Unfortunately I wasn't able to debug what's causing the problem when both of the modules are included in the same controller. zipline uses a different...
@anakinj I suspect it has become clearer what is going on here, I've reproduced it on two of our keys which fail to recreate an elliptic curve point correctly. This...
Ah I see that my second example is actually yours 😆 well, even better then - we know what is happening
Or this might be a bug in `OpenSSL::BN.new` 🤣 which would be ever more entertaining tbh
Here a whole block of known JWKSes from our APM which were causing the issue. This is confirmed fixed with the 0-byte hack above. ```ruby jwk_payloads = [ "{\"keys\":[{\"kty\":\"EC\",\"crv\":\"P-256\",\"x\":\"0Nv5IKAlkvXuAKmOmFgmrwXKR7qGePOzu_7RXg5msw\",\"y\":\"FqnPSNutcjfvXNlufwb7nLJuUEnBkbMdZ3P79nY9c3k\"}]}", "{\"keys\":[{\"kty\":\"EC\",\"crv\":\"P-256\",\"x\":\"xGjPg-7meZamM_yfkGeBUB2eJ5c82Y8vQdXwi5cVGw\",\"y\":\"9FwKAuJacVyEy71yoVn1u1ETsQoiwF7QfkfXURGxg14\"}]}",...
@excpt I've put up a PR if you want to take a look
You could try reproducing by roundtripping the example keys I've added to the test. If they come out truncated - this might as well be a bug in OpenSSL. Now...