]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
pap: Only look for passwords amongst non-vendor attributes (#4865)
authorTerry Burton <tez@terryburton.co.uk>
Thu, 26 Jan 2023 14:05:22 +0000 (14:05 +0000)
committerGitHub <noreply@github.com>
Thu, 26 Jan 2023 14:05:22 +0000 (09:05 -0500)
Otherwise, the following will trigger a "Don't set
control:User-Password" warning:

VENDOR ABC 42
BEGIN-VENDOR ABC
ATTRIBUTE Not-A-Password 2 string
END-VENDOR ABC

update { &control:Not-A-Password := "x" }
pap

src/modules/rlm_pap/rlm_pap.c

index 5fc6877dceb22ad8d442e063565009c870a0a2aa..94fbcc861092e775d797d99472a6c10454c7e0cb 100644 (file)
@@ -359,9 +359,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, REQUEST *reque
        for (vp = fr_cursor_init(&cursor, &request->config);
             vp;
             vp = fr_cursor_next(&cursor)) {
-               VERIFY_VP(vp);
+
        next:
-               switch (vp->da->attr) {
+
+               VERIFY_VP(vp);
+
+               if (!vp->da->vendor) switch (vp->da->attr) {
                case PW_USER_PASSWORD: /* deprecated */
                        RWDEBUG("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                        RWDEBUG("!!! Ignoring control:User-Password.  Update your        !!!");