You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the mode to wb+, thus using an io.BytesIO instance underneath.
When accessing the mode attribute from werkzeug.datastructures.FileStorage, the one from tempfile.SpooledTemporaryFile will be used, and as there is no mode for io.BytesIO, the one set in the constructor will be used, resulting in a write-only mode being returned.
To my knowledge, FileStorage is only returned to read files, so the mode exposed to clients should be read-only.
You can reproduce the bug by checking filestorage.mode while executing this test case.