How do I make the website execute links?

后端 未结 1 375
孤城傲影
孤城傲影 2021-01-28 07:59

I\'m making a small webpage that is going to execute links, en specifics magnet links. But the webserveruserrole does not carry enough mojo (rights, Process.Start()

相关标签:
1条回答
  • 2021-01-28 08:24

    If starting a process from a webpage was possible, this would be a highway for viruses.

    Of course, I assume you understand the http model. The webpage is actually executed on the server, all the code runs on the server. The client browser only display the html received from the one time http request/response.

    You can however, as you guessed, create custom url Scheme (yourapp://yourquery). The client side has to register an application to handle such urls (that's how the magnet links works).

    More information on the msdn page: Registering an Application to a URL Protocol.

    However, I emphasis what Microsoft says :

    security alert Security Alert Applications that handle URL protocols must consider how to respond to malicious data. Because handler applications can receive data from untrusted sources, the URL and other parameter values passed to the application may contain malicious data that attempts to exploit the handling application.

    This can lead to serious problem if the application does not know how to handle malicious data.

    0 讨论(0)
提交回复
热议问题