office-gobmx/external/neon/neon_uri_parse_allow_others.patch
Jan-Marek Glogowski 38ef425f04 neon: drop special whitespace href handling
Since whitespace (0x20, 0x09) in the URI path is now included in
the neon_uri_parse_allow_others.patch to accept SharePoint IRIs
as valid URIs, drop that hunk and document a link to the upstream
discussion in the Makefile.

Change-Id: I7b776e9bcaa716069b0f83a97499cf49e5ed1644
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88447
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
2020-02-11 19:51:41 +01:00

23 lines
852 B
Diff

diff -ur src/ne_uri.c
--- src/ne_uri.c 2020-02-07 10:49:58.764417840 +0000
+++ src/ne_uri.c 2020-02-07 10:51:33.675627141 +0000
@@ -87,7 +87,9 @@
/* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" */
#define URI_PCHAR (URI_UNRESERVED | PC | URI_SUBDELIM | CL | AT)
/* invented: segchar = pchar / "/" */
-#define URI_SEGCHAR (URI_PCHAR | FS)
+/* allow OT characters to parse SharePoint 2016 href IRIs (breaking the spec
+ * of href XML Element: "MUST contain a URI or a relative reference." */
+#define URI_SEGCHAR (URI_PCHAR | FS | OT)
/* query = *( pchar / "/" / "?" ) */
#define URI_QUERY (URI_PCHAR | FS | QU)
/* fragment == query */
@@ -237,7 +238,7 @@
p = s;
- while (uri_lookup(*p) & URI_SEGCHAR)
+ while (uri_lookup(*p) & URI_SEGCHAR && *p != '\0')
p++;
/* => p = [ "?" query ] [ "#" fragment ] */