修复CSRF可能导致访问控制自动保存失败的问题

This commit is contained in:
GoEdgeLab
2022-08-30 12:08:42 +08:00
parent 37b3333ae6
commit 57a3ae2d94
4 changed files with 2 additions and 5 deletions

View File

@@ -61,7 +61,6 @@ func (this *IndexAction) RunPost(params struct {
AuthJSON []byte AuthJSON []byte
Must *actions.Must Must *actions.Must
CSRF *actionutils.CSRF
}) { }) {
defer this.CreateLogInfo("修改Web %d 的鉴权设置", params.WebId) defer this.CreateLogInfo("修改Web %d 的鉴权设置", params.WebId)

View File

@@ -61,7 +61,6 @@ func (this *IndexAction) RunPost(params struct {
AuthJSON []byte AuthJSON []byte
Must *actions.Must Must *actions.Must
CSRF *actionutils.CSRF
}) { }) {
defer this.CreateLogInfo("修改Web %d 的认证设置", params.WebId) defer this.CreateLogInfo("修改Web %d 的认证设置", params.WebId)

View File

@@ -4,7 +4,6 @@
<div class="right-box with-menu"> <div class="right-box with-menu">
<form class="ui form" data-tea-action="$" data-tea-success="success" ref="authForm"> <form class="ui form" data-tea-action="$" data-tea-success="success" ref="authForm">
<csrf-token></csrf-token>
<input type="hidden" name="webId" :value="webId"> <input type="hidden" name="webId" :value="webId">
<http-auth-config-box :v-auth-config="authConfig" @change="changeMethods"></http-auth-config-box> <http-auth-config-box :v-auth-config="authConfig" @change="changeMethods"></http-auth-config-box>
<submit-btn @ref=""></submit-btn> <submit-btn @ref=""></submit-btn>

View File

@@ -7,9 +7,9 @@
<div class="right-box tiny"> <div class="right-box tiny">
<form class="ui form" data-tea-action="$" data-tea-success="success" ref="authForm"> <form class="ui form" data-tea-action="$" data-tea-success="success" ref="authForm">
<csrf-token></csrf-token>
<input type="hidden" name="webId" :value="webId"> <input type="hidden" name="webId" :value="webId">
<http-auth-config-box :v-auth-config="authConfig" :v-is-location="true" @change="changeMethods"></http-auth-config-box> <http-auth-config-box :v-auth-config="authConfig" :v-is-location="true"
@change="changeMethods"></http-auth-config-box>
<submit-btn></submit-btn> <submit-btn></submit-btn>
</form> </form>
</div> </div>