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

Filename detecting problem on uploading file with apostrophes #3483

Closed
romanesko opened this issue Apr 29, 2017 · 0 comments
Closed

Filename detecting problem on uploading file with apostrophes #3483

romanesko opened this issue Apr 29, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@romanesko
Copy link

@romanesko romanesko commented Apr 29, 2017

Hapi doesn't detect uploaded file name apostrophes

Request headers:

Content-Length:283430
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryCM4DsKeBSaABGqvx

Request payload:

------WebKitFormBoundaryCM4DsKeBSaABGqvx
Content-Disposition: form-data; name="file"; filename="Sol'nyi_kontsiert_L'ONE_20052017_2000_127500278149.Pdf"
Content-Type: application/pdf
------WebKitFormBoundaryCM4DsKeBSaABGqvx--

request.payload.file.hapi:

{ filename: '',
  headers:
   { 'content-disposition': 'form-data; name="file"; filename="Sol\'nyi_kontsiert_L\'ONE_20052017_2000_127500278149.Pdf"',
     'content-type': 'application/pdf' } }

The filename is empty ('')

The same request for the same file but without the apostrophes in the name works just fine:

Request headers:

Content-Length:283428
Content-Type:multipart/form-data; boundary=----WebKitFormBoundarywle0JFttRBnW73N3
Cookie:tt_uuid=f832069e-c550-4637-bd0f-09d7adce4a4d; tt_uid=1; io=wmhKrRAnDwsOxihpAAAB

Request Payload:

------WebKitFormBoundarywle0JFttRBnW73N3
Content-Disposition: form-data; name="file"; filename="Solnyi_kontsiert_LONE_20052017_2000_127500278149.Pdf"
Content-Type: application/pdf
------WebKitFormBoundarywle0JFttRBnW73N3--

request.payload.file.hapi:

{ filename: 'Solnyi_kontsiert_LONE_20052017_2000_127500278149.Pdf',
  headers:
   { 'content-disposition': 'form-data; name="file"; filename="Solnyi_kontsiert_LONE_20052017_2000_127500278149.Pdf"',
     'content-type': 'application/pdf' } }

HAPI version 16.1.0
node version v7.2.1

@hueniverse hueniverse self-assigned this Jul 20, 2017
@hueniverse hueniverse added the bug label Jul 20, 2017
@hueniverse hueniverse added this to the 16.5.0 milestone Jul 20, 2017
@hueniverse hueniverse closed this Jul 20, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants