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
Closes the remaining gaps found in the final review of the SSRF/robustness
fixes:
- httpGet()/httpPost() now error_log() the rejected URL and configured base
(with any embedded credentials stripped) when isWithinBase() refuses a
request, instead of just returning false with no trace - previously this
was the exact silent-failure mode (empty dropdown, no error anywhere) this
PR set out to fix.
- isWithinBase() now rejects non-http(s) schemes, so the $baseOverride
self-check path used by validateSettings() (isWithinBase($x, $x)) can no
longer treat gopher:// or ftp:// as well-formed. Added 3 assertions
(59 -> 62).
- findValueSet() now returns ['error' => ...] instead of a bare [] on circuit-
breaker-open and transport failure, reusing the shape it already used for
an unknown search type, and FindValueSetService.php sets HTTP 502 on that
shape - mirroring how getValueSetInfo()'s false return already becomes a
502. Verified this can't affect the online designer: its ajax call defines
no `error` handler, so a non-2xx response simply means the autocomplete
list doesn't update for that keystroke, rather than a 200 that looks like
a genuine empty result.
- Removed the always-false isset($http_response_header) diagnostic in
validateSettings() (that variable belongs to httpPost()'s scope, not this
one) and simplified the message it was decorating.
- tests/run.php now exits immediately when not run under the CLI SAPI, since
it ships inside the module directory under the REDCap web root.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NVZekhAz2pittp3iGgsKnK
(cherry picked from commit 6084ecfcd21347898cbef5d53a3bc3e1b0390280)
0 commit comments