You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/07/12 08:54:00 UTC
[jira] [Commented] (KNOX-2931) Some special characters in the rewrite rule cannot be escaped
[ https://issues.apache.org/jira/browse/KNOX-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742322#comment-17742322 ]
ASF subversion and git services commented on KNOX-2931:
-------------------------------------------------------
Commit 8bb882d7432709af2844b8acdbe939ac9203225d in knox's branch refs/heads/master from Attila Magyar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=8bb882d74 ]
KNOX-2931 - Some special characters in the rewrite rule cannot be escaped (#769)
> Some special characters in the rewrite rule cannot be escaped
> -------------------------------------------------------------
>
> Key: KNOX-2931
> URL: https://issues.apache.org/jira/browse/KNOX-2931
> Project: Apache Knox
> Issue Type: Task
> Reporter: Attila Magyar
> Assignee: Attila Magyar
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> HTML content:
> {code}
> <td><a href="{{typestat.portval.toLowerCase()}}://{{typestat.hostname}}:{{typestat.portno}}" target="_blank">{{typestat.hostname}}</a></td>
> {code}
> Rule:
> {code}
> <rule dir="OUT" name="OZONE-SCM/ozone-scm/outbound/datanode/address">
> <match pattern="{{typestat.portval.toLowerCase()}}://{{typestat.hostname}}:{{typestat.portno}}"/>
> <rewrite template="{gateway.url}/ozone-scm/datanode/index.html?host={{typestat.portval.toLowerCase()}}://{{typestat.hostname}}:{{typestat.portno}} "/>
> </rule>
> {code}
> The goal is to prepend knox URL in front of the href and have:
> {code}
> https://KNOX/gateway/topology/service?host={{typestat.portval.toLowerCase()}}://{{typestat.hostname}}:{{typestat.portno}}
> {code}
> It seems that the {{ ... }} part is interpreted as a place holder and the host part is completely omitted.
> Interestingly adding a dummy space at the end solves it.
> cc: [~zitadombi]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)