Challenge: improve the speed of the #curl dotdot URL normalizer function. (without doing ridiculous things)
github.com/curl/curl/blob/28d2…
curl/lib/urlapi.c at 28d27570fa021011b8679344d090772fea49d0d1 · curl/curl
A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP...GitHub
Marcus Müller
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Marcus Müller • • •curl disclosed on HackerOne: Denial of Service (DoS) vulnerability...
HackerOneMarcus Müller
in reply to daniel:// stenberg:// • • •ah. OK. (and yes, if the problem is "people get to pass unchecked complexity strings to libcurl", then that's an API consumer problem, not a problem of the lib implementing that API)
Simple solution here would *seem* (I bet the devil's in the details!) to be to have two arrays, instead of just the first
1. char array for output
2. max_substring_length_integer array for "how long is this output path component"
. Then, encountering `./` in the input just leaves both alone, and
1/2
M. Verdone
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to M. Verdone • • •curl disclosed on HackerOne: Denial of Service (DoS) vulnerability...
HackerOne