You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Form containing a SocketAddrV4 field is failing to parse input such as 127.0.0.1:80. I'm under the impression that this is because FromFormValue::from_form_value() and subsequently SocketAddrV4::from_str() is being called with the encoded address as a parameter (e.g. 127.0.0.1%3A80) instead of 127.0.0.1:80.
#[derive(FromForm)]structInput{ip:SocketAddrV4,}#[post("/test", data = "<input>")]fntest(input:Form<Input>){}
The above code will not parse input such as 127.0.0.1:80 because the colon ':' is encoded. This results in 127.0.0.1%3A80 being passed into FromFormValue::from_form_value() which will fail.
The text was updated successfully, but these errors were encountered:
lewisclark
changed the title
Forms that contain structures affected by percent-encoding (such as SocketAddrV4) fail to parse
Forms that contain structures affected by encoding (such as SocketAddrV4) fail to parse
Sep 7, 2020
Bug Report
Version 0.4.5
OS: Debian 10 (Linux 4.19.0-10-cloud-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux)
A Form containing a SocketAddrV4 field is failing to parse input such as 127.0.0.1:80. I'm under the impression that this is because FromFormValue::from_form_value() and subsequently SocketAddrV4::from_str() is being called with the encoded address as a parameter (e.g. 127.0.0.1%3A80) instead of 127.0.0.1:80.
The above code will not parse input such as 127.0.0.1:80 because the colon ':' is encoded. This results in 127.0.0.1%3A80 being passed into FromFormValue::from_form_value() which will fail.
The text was updated successfully, but these errors were encountered: