diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-09-11 21:04:02 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-09-11 21:04:02 +0200 |
| commit | dd1061b6a79b0161597799e825bfefc27993ace5 (patch) | |
| tree | f7099078291da669907c5e3f428c10af27a54417 /include | |
| parent | 5126cf9a15f9e5c3986be0fc2743b63adcc6b1fb (diff) | |
| download | busybox-w32-dd1061b6a79b0161597799e825bfefc27993ace5.tar.gz busybox-w32-dd1061b6a79b0161597799e825bfefc27993ace5.tar.bz2 busybox-w32-dd1061b6a79b0161597799e825bfefc27993ace5.zip | |
wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625.
function old new delta
percent_decode_in_place - 152 +152
parse_url 304 317 +13
handle_incoming_and_exit 2795 2798 +3
httpd_main 763 760 -3
decodeString 152 - -152
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index d0c7ace22..21cbe1cac 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -1578,6 +1578,15 @@ int starts_with_cpu(const char *str) FAST_FUNC; | |||
| 1578 | unsigned get_cpu_count(void) FAST_FUNC; | 1578 | unsigned get_cpu_count(void) FAST_FUNC; |
| 1579 | 1579 | ||
| 1580 | 1580 | ||
| 1581 | /* Use strict=1 if you process input from untrusted source: | ||
| 1582 | * it will return NULL on invalid %xx (bad hex chars) | ||
| 1583 | * and str + 1 if decoded char is / or NUL. | ||
| 1584 | * In non-strict mode, it always succeeds (returns str), | ||
| 1585 | * and also it additionally decoded '+' to space. | ||
| 1586 | */ | ||
| 1587 | char *percent_decode_in_place(char *str, int strict) FAST_FUNC; | ||
| 1588 | |||
| 1589 | |||
| 1581 | extern const char bb_uuenc_tbl_base64[]; | 1590 | extern const char bb_uuenc_tbl_base64[]; |
| 1582 | extern const char bb_uuenc_tbl_std[]; | 1591 | extern const char bb_uuenc_tbl_std[]; |
| 1583 | void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; | 1592 | void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; |
