Basically I'm trying to open a URL in my .NET application. This can be achieved easily by doing :
Process.Start("http://www.google.com")
However in my case the URL can be controlled by external users, therefore I don't want them to execute commands in the system by injecting meta characters etc.
So safe way would be :
- Read registry and see what's the default browser
- Creating
New Process()
with the default browser's executable - Supply the URL as argument
- Start the process
Before implementing this, I just want to be sure I'm not making this overcomplicated. What do you think?
I'm not keen on implementing filtering on the input, it's just a dirty solution