validation system false positive on URL with `#`
See original GitHub issue🐛 Bug Report
Validation has false positive on URLs with #
in the URL
Have you read the [Contributing Guidelines on issues]
yes
To Reproduce
- Create a link definition in
docusaurus.config.js
as follows:
footer: {
links: [
{
title: 'Docs',
items: [
{
href: 'https://riot.im/app/#/room/#ligo-public:matrix.org',
label: 'Riot'
}
]
}
}
- run
npm run build
Expected behaviour
Build should complete without error
Actual Behavior
We get an error:
Creating an optimized production build...
A validation error occured.
The validation system was added recently to Docusaurus as an attempt to avoid user configuration errors.
We may have made some mistakes.
If you think your configuration is valid and should keep working, please open a bug report.
ValidationError: "footer.links[1].items[3].href" must be a valid uri
Your Environment
"@docusaurus/core": "^2.0.0-alpha.61"
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Validate & Analyse False Positive Alerts from your EDR - VMRay
Learn how VMRay Analyzer helps security teams easily validate false positive alerts from endpoint detection and response systems.
Read more >Address false positives/negatives in Microsoft Defender for ...
Learn how to handle false positives or false negatives in ... See Configure and validate exclusions for Microsoft Defender Antivirus scans.
Read more >Intrusion Detection - OWASP Foundation
A false positive is a false alarm. A false negative state is the most serious and dangerous state. This is when the IDS...
Read more >Vulnerability scans and false positives: the importance of ...
The scanner identifies an input field, which it tests to see if a blind injection attack is possible, inserting input that contains a...
Read more >False Positive Check - Dotcom-Monitor
The false-positive check helps to eliminate potentially false errors when there may have been a brief hiccup or network glitch that caused a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
we can add a
Joi.custom()
and check ifurl.parse
work on the given url or not.Sorry for that. Also worth considering that before that we didn’t do any validation, so you could pass any invalid URL as well. We don’t really want to revert these validation logic.
I’ve opened an issue on Joi because I think if new URL() can parse your URL then Joi should rather accept it (I guess?).
https://github.com/sideway/joi/issues/2435
@anshulrgoyal @teikjun as you are familiar with the validation system, what about adding something like
Joi.alternatives(Joi.string().uri(),parseableUrlSchema())
or something, with parseableUrlSchema not rejecting if new URL() is ok?