[Hawkular-dev] Fwd: [hawkular-ui-services] Slash hell: Preserving the encoded slashes in the resource ids. (#71)
Heiko W.Rupp
hrupp at redhat.com
Fri Dec 4 10:01:35 EST 2015
Before we implement this - should we finally
go and ban characters that are not valid in URIs
in a literal way (see RFC 2396)?
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
"$" | ","
Also:
2.4.3. Excluded US-ASCII Characters
control = <US-ASCII coded characters 00-1F and 7F hexadecimal>
delims = "<" | ">" | "#" | "%" | <">
unwise = "{" | "}" | "|" | "\" | "^" | "[" | "]" | "`"
Data corresponding to excluded characters must be escaped in order to
be properly represented within a URI.
> From: Jirka Kremser <notifications at github.com>
> To: hawkular/hawkular-ui-services
> <hawkular-ui-services at noreply.github.com>
> Subject: [hawkular-ui-services] Slash hell: Preserving the encoded
> slashes in the resource ids. (#71)
> Date: Fri, 04 Dec 2015 06:53:17 -0800
>
> Currently the interceptor replaces all the encoded slashes to the
> simple ones, but we need to have the way to pass the encoded slash in
> the resource id. If the resource id is manually encoded with
> window.encodeURI() and then angular does it once more for the
> 'percent' symbol, it ends up as '%252F' here we turn it back to simple
> '%2F' for which the inventory backend is prepared. In short: '/' are
> allowed as resource separators: r1/r2/r3 and '%2F' are allowed in the
> resource ids: r%2F1/r%2F2
>
> @ammendonca could you please check?
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/hawkular/hawkular-ui-services/pull/71
>
> -- Commit Summary --
>
> * Preserving the encoded slashes in the resource ids. Currently the
> interceptor replaces all the encoded slashes to the simple ones, but
> we need to have the way to pass the encoded slash in the resource id.
> If the resource id is manually encoded with window.encodeURI() and
> then angular does it once more for the 'percent' symbol, it ends up as
> '%252F' here we turn it back to simple '%2F' for which the inventory
> backend is prepared. In short: '/' are allowed as resource separators:
> r1/r2/r3 and '%2F' are allowed in the resource ids: r%2F1/r%2F2
>
> -- File Changes --
>
> M src/rest/hawkRest-inventory-provider.ts (10)
>
> -- Patch Links --
>
> https://github.com/hawkular/hawkular-ui-services/pull/71.patch
> https://github.com/hawkular/hawkular-ui-services/pull/71.diff
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/hawkular/hawkular-ui-services/pull/71
More information about the hawkular-dev
mailing list