Skip to content

rewrite: Avoid panic on bad arg count for uri#6571

Merged
francislavoie merged 2 commits intocaddyserver:masterfrom
mister-turtle:master
Sep 13, 2024
Merged

rewrite: Avoid panic on bad arg count for uri#6571
francislavoie merged 2 commits intocaddyserver:masterfrom
mister-turtle:master

Conversation

@mister-turtle
Copy link
Contributor

All cases for args[0] require additional arguments present in the slice so doing the bounds check here covers all cases. Cases requiring additional parameters already include additional checks on the len(args)

All cases for args[0] require additional arguments present in the slice so doing the bounds check here covers all cases. Cases requiring additional parameters already include additional checks on the len(args)
@CLAassistant
Copy link

CLAassistant commented Sep 13, 2024

CLA assistant check
All committers have signed the CLA.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Sep 13, 2024
@francislavoie francislavoie changed the title Avoid OOB panic on slice access in parseCaddyfileURI when invalid config is used rewrite: Avoid panic on bad arg count for uri Sep 13, 2024
…s already seem to have bounds checks in place.
Copy link
Member

@francislavoie francislavoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

(The lint errors aren't your fault, false-positives we're still dealing with separately)

@francislavoie francislavoie merged commit 21f9c20 into caddyserver:master Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants