Ticket #204 (closed defect: fixed)
authreg_pipe.c - wrong ap_base64decode call
| Reported by: | thias | Owned by: | smoku |
|---|---|---|---|
| Priority: | minor | Component: | storage |
| Version: | 2.1.23 | Keywords: | authreg_pipe.c ap_base64decode() strlen() |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
authreg-pipe is currently not working because...
storage/authreg_pipe.c, in _ar_pipe_get_password(), line 128:
if(ap_base64decode_len(&buf[3], -1) >= 256) {
and line 133:
ap_base64decode(password, &buf[3], -1);
the ap_base64decode*() functions are called with '-1' as third parameter, but the functions in util/base64.c don't recognize '-1' as "magic length", they need strlen(&buf[3]).
either enhance the ap_base64decode* util/base64.c with a nice '-1' length parameter, or just use strlen() in the calls.
attached is the patch i use.
side note: the "documentation" for pipe-auth is... nonexistent?
have fun and keep up the great work, thias