mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Fix parsing of auth cookie data
This commit is contained in:
parent
b45d4f6401
commit
ee3fed97e0
1 changed files with 16 additions and 1 deletions
|
|
@ -17,7 +17,22 @@ pub fn get_auth_cookie() -> Option<String> {
|
||||||
let mut pieces = kv_pair.split("::");
|
let mut pieces = kv_pair.split("::");
|
||||||
|
|
||||||
if let Some("COOK") = pieces.next() {
|
if let Some("COOK") = pieces.next() {
|
||||||
cookie = pieces.next();
|
let value = match pieces.next() {
|
||||||
|
Some(value) => value,
|
||||||
|
None => {
|
||||||
|
log::warn!("Unrecognized Roblox Studio cookie value: missing COOK value");
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if !value.starts_with('<') || !value.ends_with('>') {
|
||||||
|
log::warn!("Unrecognized Roblox Studio cookie value: was not wrapped in <>");
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
|
let value = &value[1..value.len() - 1];
|
||||||
|
|
||||||
|
cookie = Some(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue