Fix an infinite loop in the Apache module.
authorSteinar H. Gunderson <sesse@samfundet.no>
Wed, 15 May 2013 19:46:21 +0000 (21:46 +0200)
committerSteinar H. Gunderson <sesse@samfundet.no>
Wed, 15 May 2013 19:46:21 +0000 (21:46 +0200)
libapache2-mod-authz-itkacl-0.5/mod_authz_itkacl.c

index d892e781e71d0f080b31d7479e5890c4f9cb2e42..e55491513e17a28d09bb67f345b5729752361372 100644 (file)
@@ -116,7 +116,8 @@ static int authz_itkacl_authorize_user(request_rec *r)
 
                        if (strcasecmp(acl_path, "anyof") == 0) {
                                int num_seen = 0, ret;
 
                        if (strcasecmp(acl_path, "anyof") == 0) {
                                int num_seen = 0, ret;
-                               while ((acl_path = ap_getword_conf(r->pool, &t)) != NULL) {
+                               while ((acl_path = ap_getword_conf(r->pool, &t)) != NULL &&
+                                      strcmp(acl_path, "") != 0) {
                                        ret = handle_require(r, conf, username, acl_path);
                                        if (ret == OK) {
                                                free(username);
                                        ret = handle_require(r, conf, username, acl_path);
                                        if (ret == OK) {
                                                free(username);