[ 
https://issues.apache.org/jira/browse/GEODE-10612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinwoo Hwang updated GEODE-10612:
---------------------------------
    Description: 
When the region-detail page is opened for a path that does not resolve to an
existing region, Pulse displays:

    Region [<path>] is not available

The path comes from the page URL and is inserted into that message, and the
message is rendered into the page as HTML. Characters that are significant in
HTML - '<', '>', '&', quotes - are therefore consumed by the browser instead of
being shown, so the operator sees an altered or truncated path rather than the
one that was actually requested. That makes the message misleading in exactly
the situation where it needs to be precise: telling the operator which path
could not be found.

Steps to reproduce
------------------
1. Start a locator with the HTTP service enabled and log in to Pulse.
2. Open a region-detail URL whose path contains an HTML character, e.g.
   /pulse/regionDetail.html?regionFullPath=%2Forders%3C2026%3E
3. Observe the "is not available" message.

Expected: Region [/orders<2026>] is not available
Actual:   the "<2026>" portion is missing from the displayed path

Notes
-----
Region names themselves are restricted to alphanumeric characters, hyphens and
underscores (RegionNameValidation), so this only affects paths that do not
correspond to an existing region - which is precisely the case this message
exists to report. It is reachable through stale or externally generated links,
such as a bookmarked region-detail URL for a region that has since been
destroyed, or a link constructed by external tooling.

Two services build this message and both are affected:
  - ClusterSelectedRegionService
  - ClusterSelectedRegionsMemberService

Suggested fix
-------------
Encode the path for the HTML context when building the message. The region
lookup should continue to use the path exactly as supplied, so that resolution
behaviour is unchanged.



  was:
Pulse region-detail error message does not display the requested region path 
correctly



> Pulse region-detail error message does not display the requested region path 
> correctly
> --------------------------------------------------------------------------------------
>
>                 Key: GEODE-10612
>                 URL: https://issues.apache.org/jira/browse/GEODE-10612
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Jinwoo Hwang
>            Assignee: Jinwoo Hwang
>            Priority: Major
>
> When the region-detail page is opened for a path that does not resolve to an
> existing region, Pulse displays:
>     Region [<path>] is not available
> The path comes from the page URL and is inserted into that message, and the
> message is rendered into the page as HTML. Characters that are significant in
> HTML - '<', '>', '&', quotes - are therefore consumed by the browser instead 
> of
> being shown, so the operator sees an altered or truncated path rather than the
> one that was actually requested. That makes the message misleading in exactly
> the situation where it needs to be precise: telling the operator which path
> could not be found.
> Steps to reproduce
> ------------------
> 1. Start a locator with the HTTP service enabled and log in to Pulse.
> 2. Open a region-detail URL whose path contains an HTML character, e.g.
>    /pulse/regionDetail.html?regionFullPath=%2Forders%3C2026%3E
> 3. Observe the "is not available" message.
> Expected: Region [/orders<2026>] is not available
> Actual:   the "<2026>" portion is missing from the displayed path
> Notes
> -----
> Region names themselves are restricted to alphanumeric characters, hyphens and
> underscores (RegionNameValidation), so this only affects paths that do not
> correspond to an existing region - which is precisely the case this message
> exists to report. It is reachable through stale or externally generated links,
> such as a bookmarked region-detail URL for a region that has since been
> destroyed, or a link constructed by external tooling.
> Two services build this message and both are affected:
>   - ClusterSelectedRegionService
>   - ClusterSelectedRegionsMemberService
> Suggested fix
> -------------
> Encode the path for the HTML context when building the message. The region
> lookup should continue to use the path exactly as supplied, so that resolution
> behaviour is unchanged.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to