Skip to content

Commit

Permalink
Merge pull request from GHSA-r6r4-5pr8-gjcp
Browse files Browse the repository at this point in the history
* Replace the ancient CVaporURLParser code with use of Foundation's URLComponents

* Fixes for weird macOS behaviors

* Tests fixup

* Add test for extreme-length untrusted input which triggered failures in the old implementation.

* Fix Sendable warnings across multiple Swift versions

* Indirect through URL to get to URLComponents so parsing is consistent on Linux.

* A couple more test fixes.
  • Loading branch information
gwynne committed Jan 3, 2024
1 parent 67fe736 commit 6db3d91
Show file tree
Hide file tree
Showing 13 changed files with 603 additions and 1,049 deletions.
2 changes: 0 additions & 2 deletions Package.swift
Expand Up @@ -66,15 +66,13 @@ let package = Package(
targets: [
// C helpers
.target(name: "CVaporBcrypt"),
.target(name: "CVaporURLParser"),

// Vapor
.target(name: "Vapor", dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "AsyncKit", package: "async-kit"),
.product(name: "Backtrace", package: "swift-backtrace"),
.target(name: "CVaporBcrypt"),
.target(name: "CVaporURLParser"),
.product(name: "ConsoleKit", package: "console-kit"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Metrics", package: "swift-metrics"),
Expand Down
14 changes: 9 additions & 5 deletions Package@swift-5.9.swift
Expand Up @@ -63,16 +63,14 @@ let package = Package(
targets: [
// C helpers
.target(name: "CVaporBcrypt"),
.target(name: "CVaporURLParser"),


// Vapor
.target(
name: "Vapor",
dependencies: [
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "AsyncKit", package: "async-kit"),
.target(name: "CVaporBcrypt"),
.target(name: "CVaporURLParser"),
.product(name: "ConsoleKit", package: "console-kit"),
.product(name: "Logging", package: "swift-log"),
.product(name: "Metrics", package: "swift-metrics"),
Expand Down Expand Up @@ -130,15 +128,21 @@ let package = Package(
.copy("Utilities/expired.crt"),
.copy("Utilities/expired.key"),
],
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")]
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals"),
.enableExperimentalFeature("StrictConcurrency=complete"),
]
),
.testTarget(
name: "AsyncTests",
dependencies: [
.product(name: "NIOTestUtils", package: "swift-nio"),
.target(name: "XCTVapor"),
],
swiftSettings: [.enableExperimentalFeature("StrictConcurrency=complete")]
swiftSettings: [
.enableUpcomingFeature("BareSlashRegexLiterals"),
.enableExperimentalFeature("StrictConcurrency=complete"),
]
),
]
)
59 changes: 0 additions & 59 deletions Sources/CVaporURLParser/include/urlparser.h

This file was deleted.

0 comments on commit 6db3d91

Please sign in to comment.