-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Invalid hash" when trying to upload a file #742
Comments
Hi @mikker, thanks for the report. It looks like file uploading is broken in the latest version :/ If you downgrade the stripe gem to 4.7.1, file uploads should work once again. We'll release a fix soon. Sorry for the inconvenience! |
Looks like you are right. A rogue No worries 👍 |
With stripe 4.8.0, the file contents are replaced by |
@brandur-stripe This was a regression caused by #741. As far as I can tell this happens because we call The simplest way to fix this would be to drop |
Sounds like something I could've done myself. Thanks for the swift response. |
In #741 I tried to do something too clever by replacing instances of `Faraday::UploadIO` found in parameters with a human-readable string to improve `STRIPE_LOG` logging output. I thought I'd tested it at the time, but apparently not (or not well enough), and this change caused the regression detailed in #742. My findings about how Faraday encodes multipart were apparently wrong and it does use these parameters, so here we remove the step where we try to nicen them for logging. The logs look a little worse, but it's not that big of a deal. I've tested this patch against the API and confirmed that it addresses the problem. Fixes #742.
Released a fix in 4.8.1. |
Don't worry! Glad to have it solved 😊 |
I get these 400 Invalid request errors when trying to upload files. Haven't touched a thing since it was working a few days ago.
Rails 5.2.2.
The text was updated successfully, but these errors were encountered: