luci-base: dispatcher: reject non-POST requests with any cbi.submit value
Due to the fact that luci.model.cbi reacts on any "cbi.submit" value while the dispatcher only required POST for cbi.submit == 1, the CSRF token protection could be bypassed. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
697db81246
commit
186e690c08
1 changed files with 2 additions and 2 deletions
|
@ -892,7 +892,7 @@ end
|
|||
function cbi(model, config)
|
||||
return {
|
||||
type = "cbi",
|
||||
post = { ["cbi.submit"] = "1" },
|
||||
post = { ["cbi.submit"] = true },
|
||||
config = config,
|
||||
model = model,
|
||||
target = _cbi
|
||||
|
@ -938,7 +938,7 @@ end
|
|||
function form(model)
|
||||
return {
|
||||
type = "cbi",
|
||||
post = { ["cbi.submit"] = "1" },
|
||||
post = { ["cbi.submit"] = true },
|
||||
model = model,
|
||||
target = _form
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue