api: return "invalid" as CSRF token for partial tickets
So that old clients don't `unwrap` a `None` value. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
63fd8e58b2
commit
ad0ed40a59
@ -163,7 +163,9 @@ fn authenticate_2nd(
|
|||||||
},
|
},
|
||||||
CSRFPreventionToken: {
|
CSRFPreventionToken: {
|
||||||
type: String,
|
type: String,
|
||||||
description: "Cross Site Request Forgery Prevention Token.",
|
description:
|
||||||
|
"Cross Site Request Forgery Prevention Token. \
|
||||||
|
For partial tickets this is the string \"invalid\".",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -207,6 +209,7 @@ fn create_ticket(
|
|||||||
Ok(json!({
|
Ok(json!({
|
||||||
"username": username,
|
"username": username,
|
||||||
"ticket": ticket,
|
"ticket": ticket,
|
||||||
|
"CSRFPreventionToken": "invalid",
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user