-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix crash with missing parameter #130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch and a great fix! Just a couple of nitpicks, see the inline comments 👍
Oh, I forgot to also add - can you add a test for this as well? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
==========================================
- Coverage 82.15% 82.09% -0.07%
==========================================
Files 25 25
Lines 2595 2603 +8
==========================================
+ Hits 2132 2137 +5
- Misses 463 466 +3
|
@gwynne Updated, please check 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! One last nit and all should be good to go 🙂
Co-authored-by: Gwynne Raskind <[email protected]>
@gwynne Good one! I committed your suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@0xTim You probably saw this but something ran out of memory so it didn't succeed merging |
These changes are now available in 1.10.5
This line https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/LeafParser/LeafParser.swift#L203
would cause a crash when no parameters are found
Fixed issue that lead to a crash when parameters would be empty in line https://github.com/vapor/leaf-kit/blob/main/Sources/LeafKit/LeafParser/LeafParser.swift#L203