[GH-ISSUE #498] Content-Disposition header not valid #329

Closed
opened 2026-03-03 16:47:44 +03:00 by kerem · 1 comment
Owner

Originally created by @bengsson on GitHub (Nov 23, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/498

Description:

The Content-Disposition header ends with ";" when creating an OAuthSwiftMultipartData object with the parameter fileName set to nil. This violates the Hypertext Transfer Protocol RFC 6266 section 4.1 (https://tools.ietf.org/html/rfc6266#section-4.1).

When building the contentDispositionString in the append function in OAuthSwiftMultipartData.swift the ";" should not be separating name and filename, it should be a prefix in the filenameClause variable and therefor only be present when it supposed to.

OAuth Provider? (Twitter, Github, ..):

OpenID

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Manually

Library version:

  • head
  • v1.2.1
  • v1.2 (Swift 4.0)
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)

Xcode version:

  • 9.3 (Swift 4.1)

  • 9.0 (Swift 4.0)

  • 9.0 (Swift 3.2)

  • 8.x (Swift 3.x)

  • 8.0 (Swift 2.3)

  • 7.3.1

  • other: (Please fill in the version you are using.)

  • objective c

Originally created by @bengsson on GitHub (Nov 23, 2018). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/498 ### Description: The Content-Disposition header ends with ";" when creating an OAuthSwiftMultipartData object with the parameter fileName set to nil. This violates the Hypertext Transfer Protocol RFC 6266 section 4.1 (https://tools.ietf.org/html/rfc6266#section-4.1). When building the contentDispositionString in the append function in OAuthSwiftMultipartData.swift the ";" should not be separating name and filename, it should be a prefix in the filenameClause variable and therefor only be present when it supposed to. ### OAuth Provider? (Twitter, Github, ..): OpenID ### OAuth Version: - [ ] Version 1 - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [x] Carthage - [ ] CocoaPods - [ ] Manually ### Library version: - [x] head - [ ] v1.2.1 - [ ] v1.2 (Swift 4.0) - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x] 9.3 (Swift 4.1) - [ ] 9.0 (Swift 4.0) - [ ] 9.0 (Swift 3.2) - [ ] 8.x (Swift 3.x) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [ ] other: (Please fill in the version you are using.) - [ ] objective c
kerem closed this issue 2026-03-03 16:47:45 +03:00
Author
Owner

@phimage commented on GitHub (Nov 23, 2018):

thanks, waiting for the PR ;)

<!-- gh-comment-id:441248647 --> @phimage commented on GitHub (Nov 23, 2018): thanks, waiting for the PR ;)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#329
No description provided.