选择 MVC 视图引擎
我想允许我的 Web 应用程序的最终用户修改存储在数据库中的视图(通过基于 Web 的后台)。 所需的视图引擎应该是代码注入安全的,这意味着最终用户将被限制为可用表达式的绝对最小数量,并且不允许插入服务器代码。
有合适的视图引擎可供下载吗?
I want to allow the end-users of my web application to modify views (via web based back office), stored in the database.
The desired view engine is expected to be code-injection safe, meaning that the end-user will be limited to the absolute minimum number of expressions available, no server code inserts are allowed.
Is any suitable view engine available to download?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道任何现有的引擎,但 Phil Haack 有一篇关于在数据库中存储视图的帖子:http://haacked.com/archive/2009/04/22/scripted-db-views.aspx
这篇文章讨论了用户创建的视图的概念。如果您想防范 XSS 风格的代码注入攻击,您可以清理您的 HTML 。
I don't know of any existing engine, but Phil Haack has a post on storing views in a database: http://haacked.com/archive/2009/04/22/scripted-db-views.aspx
That post deals with the idea of user-created views. If you want to protect against XSS-style code injection attacks, you can sanitize your HTML.