fix: add csrf and remove need of a cache

This commit is contained in:
Johan Siebens
2022-09-03 17:33:22 +02:00
parent 41827dcdcd
commit d735974406
6 changed files with 62 additions and 49 deletions
+6 -2
View File
@@ -80,8 +80,10 @@
<small>You are a member of the System Admin group:</small>
</div>
<form method="post">
<input type="hidden" name="aid" value="{{.AccountID}}">
<input type="hidden" name="_csrf" value="{{.Csrf}}">
<ul class="selectionList">
<li><button type="submit" name="a" value="true">OK, continue as System Admin</button></li>
<li><button type="submit" name="sad" value="true">OK, continue as System Admin</button></li>
</ul>
</form>
{{end}}
@@ -98,9 +100,11 @@
</div>
{{end}}
<form method="post">
<input type="hidden" name="aid" value="{{.AccountID}}">
<input type="hidden" name="_csrf" value="{{.Csrf}}">
<ul class="selectionList">
{{range .Tailnets}}
<li><button type="submit" name="s" value="{{.ID}}">{{.Name}}</button></li>
<li><button type="submit" name="tid" value="{{.ID}}">{{.Name}}</button></li>
{{end}}
</ul>
</form>