Closed
Description
Describe
There is a way to bypass your regex to validate private & local networks.
If we use http://127.0.0.1/ or http://localhost/ to link preview, we don't see it (Error: link-preview-js did not receive a valid a url or text
), but if we use a domain that resolved to 127.0.0.1, we can. For example: localtest.me resolved to 127.0.0.1 (localhost), i.e. If you 'curl localtest.me', you'll see your localhost.
Similarly we can read any other private & local address, any port.
To Reproduce
Steps to reproduce:
- Find domain that resolved to private address with reverse ip lookup or use localtest.me (127.0.0.1) or devhead.net (127.0.0.1 + 192.168.1.1 + 192.168.0.1).
- Write it to getLinkPreview.
- Done. You see your local domain.
Metadata
Metadata
Assignees
Labels
No labels