Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix malformed uri #498

Merged
merged 4 commits into from
Oct 14, 2023
Merged

Fix malformed uri #498

merged 4 commits into from
Oct 14, 2023

Conversation

manunio
Copy link
Contributor

@manunio manunio commented Oct 13, 2023

While Fuzzing locally using jazzer.js YAML.parse() threw uncaught exception at

if (prefix) return prefix + decodeURIComponent(suffix)
this pr attempts to fix that.

URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at Directives.tagName (/home/maxx/dev/security/oss-fuzz-projects/eemeli-yaml/dist/doc/directives.js:126:29)

Copy link
Owner

@eemeli eemeli left a comment

Choose a reason for hiding this comment

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

Thank you for reporting this! In general the fix looks right, but see line comments for details.

src/doc/directives.ts Outdated Show resolved Hide resolved
tests/doc/parse.ts Outdated Show resolved Hide resolved
@manunio manunio requested a review from eemeli October 13, 2023 18:14
Copy link
Owner

@eemeli eemeli left a comment

Choose a reason for hiding this comment

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

Looks good! I realised that there's a better place for the test, so I moved it there.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants