添加系统URL,让管理员可以设置统一的网站URL,避免依赖于浏览器URL的安全问题 #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
一个文档被修改时,现在产生的提醒邮件里的 “阅读文档” 按钮的 URL 通过 this.Ctx.Input.Site() 生成,这依赖于浏览器的访问URL
如果一个恶意用户在其本地修改 /etc/hosts,将 wiki 的 IP 重定位到一个恶意网址 http://xxx:1234 ,然后修改某个wiki页面,那么MM-Wiki 给关注该页面的用户发送邮件,邮件里会使用该恶意网址 http://xxx:1234/document/index?document_id=123 ,用户点击链接会去到 http://xxx:1234 ,然后可能会被钓鱼。
本 PR 允许管理员设置统一的访问链接,以解决依赖访问URL来获取wiki网址存在安全问题。