Skip to content
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

decode_param issue #223

Open
rivimey opened this issue May 27, 2022 · 0 comments
Open

decode_param issue #223

rivimey opened this issue May 27, 2022 · 0 comments

Comments

@rivimey
Copy link

rivimey commented May 27, 2022

I saved a bunch of files with this, one of which had a content disposition with a "" value containing a semicolon. The code broke because it tried to interpret the text after the colon as another param, but it isn't, didn't have an '=' in it, and that broke decode_param (unable to unpack split()).

I fixed it for me by changing decode param with:

if not "=" in param:
    return param, ""

and that gave me enough info to work out the actual bug (as above).

I would suggest keeping the check in decode_param, but the proper fix is of course to use a better disposition list splitter, that takes note of double quotes and treats the contents as one unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant