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

Support multiple segments in encoded Content-Disposition #28236

Closed
wants to merge 1 commit into from

Conversation

lxbzmy
Copy link
Contributor

@lxbzmy lxbzmy commented Mar 27, 2022

According to Rfc6266 / Appendix C.1 RFC 2047 (MIME Part Three: Message Header Extensions for Non-ASCII Text), Section 2. Syntax of encoded-words ( page 3 ) :

An 'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters. If it is
desirable to encode more text than will fit in an 'encoded-word' of
75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may
be used.

Original pull request : #26463 , try to decode base64 encoded filename, but he forget there is more segments case.

And thanks @guangtuan find it.

@pivotal-cla
Copy link

@lxbzmy Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@lxbzmy Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 27, 2022
@lxbzmy lxbzmy changed the title Fix multiply base64 segments lost. Fix multiply base64 segments lost bug on #26463. Apr 3, 2022
@lxbzmy lxbzmy changed the title Fix multiply base64 segments lost bug on #26463. Fix multiply base64 segments lost bug on PR:26463 Apr 3, 2022
@poutsma poutsma self-assigned this Apr 29, 2022
@poutsma poutsma added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Apr 29, 2022
@poutsma poutsma added this to the 6.0.0-M4 milestone Apr 29, 2022
@poutsma poutsma added the type: enhancement A general enhancement label Apr 29, 2022
@poutsma poutsma changed the title Fix multiply base64 segments lost bug on PR:26463 Support multiple segments in encoded Content-Disposition Apr 29, 2022
@poutsma poutsma closed this in efafccd Apr 29, 2022
poutsma added a commit that referenced this pull request Apr 29, 2022
* gh-28236:
  Polish contribution & Support multiple quoted printable segments in Content-Disposition
  Support multiple base64 segments in Content-Disposition
@poutsma
Copy link
Contributor

poutsma commented Apr 29, 2022

Thank you for submitting a PR! I have made some minor improvements, and also added support for multiple quoted printable segments. See efafccd.

@sbrannen sbrannen removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants