Can I safely use user data when redirecting to an url on my own domain?
Assume that I own example.com
. If normal usage of my app would require me to redirect users to urls like this at times, is this ok?
https://example.com/ + userData
Is there anyway this can be used to do an exploit, and run javascript for example? or redirect to some completely different domain?
For the purposes of this discussion, I'd like to:
- ignore directory traversal attacks
- only consider attacks that affect the browser (not the example.com server)
You can assume I'm doing no encoding of the parameter I received from the user at all.
EDIT: Clarification - the userData
isn't added to the page in anyway - it only resides in the url itself.