From ce77dae043aecfe55a675cbbec6b98702f14e31a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 7 Oct 2011 08:27:02 +0200 Subject: [PATCH] Fail more gracefully on crap encoding input. --- inc/CalDAVRequest.php | 86 +++--- .../0546-iCLoud-PUT-encoded-fail.result | 11 + .../0546-iCLoud-PUT-encoded-fail.test | 14 + testing/tests/regression-suite/utf8-test.data | 278 ++++++++++++++++++ 4 files changed, 348 insertions(+), 41 deletions(-) create mode 100644 testing/tests/regression-suite/0546-iCLoud-PUT-encoded-fail.result create mode 100644 testing/tests/regression-suite/0546-iCLoud-PUT-encoded-fail.test create mode 100644 testing/tests/regression-suite/utf8-test.data diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 1eecbec0..3eedab18 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -114,28 +114,60 @@ class CalDAVRequest $this->options = $options; if ( !isset($this->options['allow_by_email']) ) $this->options['allow_by_email'] = false; + /** + * Our path is /