【发布时间】:2020-08-09 22:53:40
【问题描述】:
我有一个博客评论部分,用户可以在其中写下他们的网站并发表评论,显示如下:
<a href="https://example.com">Website</a>
<br>
<span>my website is about...</span>
<br><br>
<a href="https://example2.com">Website2</a>
<br>
<span>my website2 is about...</span>
我只允许 http/https URL 方案。
我的一些用户告诉我他们想使用像 ftp:// - mailto: - file: - info: 这样的 URL 方案编写网站或连接:
<a href="ftp://example.com">Website</a>
<br>
<span>my website is about transfering to you</span>
<br><br>
<a href="file:example2.com/file.xml">Website2</a>
<br>
<span>my website2 is about sharing a file link to download</span>
<br><br>
<a href="mailto:name@example3.com">Website2</a>
<br>
<span>my website3 is to send me email for medical conditions</span>
观看者允许这样做是否安全,或者是否会意外危及他们的隐私或安全?
【问题讨论】:
标签: html security anchor url-scheme privacy