]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix condition
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 14 Dec 2012 18:50:12 +0000 (18:50 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 14 Dec 2012 18:55:40 +0000 (18:55 +0000)
src/modules/rlm_rest/rest.c

index 5e6b495afae1ae5e163e2ba031d2229140f98f77..0a0ac8d0a010f6332e99adba0d274f4f58f7adee 100644 (file)
@@ -2393,7 +2393,16 @@ ssize_t rest_uri_build(rlm_rest_t *instance, rlm_rest_section_t *section,
 
        p = section->uri;
 
-       while ((q = strchr(p, '/')) && (count++ < 3)) p = (q + 1);
+       /*
+        *      All URLs must contain at least <scheme>://<server>/
+        */
+       while (q = strchr(p, '/')) {
+               p = q + 1;
+               
+               if (++count == 3) {
+                       break;
+               }
+       }
 
        if (count != 3) {
                radlog(L_ERR, "rlm_rest (%s): Error URI is malformed,"