在helper中引入security对象,建议插件中使用它,以降低xss风险
This commit is contained in:
@@ -21,6 +21,16 @@ class Helper
|
||||
return Typecho_Widget::widget('Widget_Options');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取Widget_Security对象
|
||||
*
|
||||
* @return Widget_Security
|
||||
*/
|
||||
public static function security()
|
||||
{
|
||||
return Typecho_Widget::widget('Widget_Security');
|
||||
}
|
||||
|
||||
/**
|
||||
* 强行删除某个插件
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user