Skip to content

Commit d283aaa

Browse files
committed
Fix redirects issue
1 parent f91e020 commit d283aaa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

urls.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
http://ook
1+
http://testphp.vulnweb.com/redir.php?r=http://savijoco.blogspot.com/goo
22
http://localhost:8080/xss/reflect/onmouseover?in=fas
33
http://localhost:8080/xss/reflect/onmouseoveffr?in=fas
44
http://localhost:8080/xss/reflect/onmouseoveffr?in=fas

utils/src/requests.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ impl Msg {
103103
.danger_accept_invalid_certs(true)
104104
.timeout(std::time::Duration::from_secs(self.timeout.unwrap_or(30)))
105105
.user_agent("Mozilla/5.0 (Windows NT 11.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36")
106-
.redirect(Policy::limited((self.redirect.unwrap_or(10) as u16).into()));
106+
.redirect({
107+
if self.redirect.unwrap_or(0) != 0 {
108+
Policy::limited(self.redirect.unwrap() as usize)
109+
} else {
110+
Policy::none()
111+
}
112+
}.into());
107113

108114
let mut headers = HeaderMap::new();
109115
if self.proxy.is_some() {

0 commit comments

Comments
 (0)