]> granicus.if.org Git - apache/commitdiff
Fix If header parsing when a non-mod_dav lock token is passed to it. We'll
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 29 Jan 2003 05:07:18 +0000 (05:07 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 29 Jan 2003 05:07:18 +0000 (05:07 +0000)
now just skip over it rather than aborting.

PR: 16452

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98524 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/dav/main/util.c

diff --git a/CHANGES b/CHANGES
index 6336b7f7a9a8bd5a82b0aa60cb8765b762a1e61c..763f357eafd229739a8e1c1f09634c025efd0479 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) Fix If header parsing when a non-mod_dav lock token is passed to it.
+     PR 16452.  [Justin Erenkrantz]
+
   *) Fix bug where 'Satisfy Any' without an AuthType lost all MIME
      information (and more). Related to PR 9076.  [AndrĂ© Malo]
 
index 17729827882f6ead5b7843ba14ab37a923b72adc..8cbc76a9700724ec87019820a528ce1c011e061d 100644 (file)
@@ -574,8 +574,16 @@ static dav_error * dav_add_if_state(apr_pool_t *p, dav_if_header *ih,
 
         if ((err = (*locks_hooks->parse_locktoken)(p, state_token,
                                                    &new_sl->locktoken)) != NULL) {
-            /* ### maybe add a higher-level description */
-            return err;
+            /* In cases where the state token is invalid, we'll just skip
+             * it rather than return 400.
+             */
+            if (err->error_id == DAV_ERR_LOCK_UNK_STATE_TOKEN) {
+                return NULL;
+            }
+            else {
+                /* ### maybe add a higher-level description */
+                return err;
+            }
         }
     }
     else