[BE] Fix encoding of classroom credentials
This commit is contained in:
parent
8dbb0cd940
commit
16bd38e6a7
@ -1,5 +1,6 @@
|
|||||||
use chrono::{DateTime, Local, TimeZone, Utc};
|
use chrono::{DateTime, Local, TimeZone, Utc};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
|
use urlencoding::encode;
|
||||||
use std::time::{SystemTime, UNIX_EPOCH};
|
use std::time::{SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
use isahc::{cookies::CookieJar, prelude::*, Request};
|
use isahc::{cookies::CookieJar, prelude::*, Request};
|
||||||
@ -188,7 +189,8 @@ async fn login() -> Result<(), String> {
|
|||||||
.cookie_jar(jar.clone())
|
.cookie_jar(jar.clone())
|
||||||
.body(format!(
|
.body(format!(
|
||||||
"login={}&password={}&submitAuth=&_qf__formLogin=",
|
"login={}&password={}&submitAuth=&_qf__formLogin=",
|
||||||
classroom_user, classroom_password
|
encode(classroom_user.as_str()),
|
||||||
|
encode(classroom_password.as_str()),
|
||||||
))
|
))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.send();
|
.send();
|
||||||
|
Loading…
Reference in New Issue
Block a user