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 2020/02/08 20:57:10 UTC

[jira] [Commented] (KNOX-2202) Knox should use UTF-8 as default encoding instead of ISO-8859-1

    [ https://issues.apache.org/jira/browse/KNOX-2202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033046#comment-17033046 ] 

ASF subversion and git services commented on KNOX-2202:
-------------------------------------------------------

Commit fad576388df3297e79a611d407e7a700b0d27b9c in knox's branch refs/heads/master from Larry McCay
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=fad5763 ]

KNOX-2227 - Strip Leading and Trailing Whitespace from Headers in KnoxShellTable (#258)

* KNOX-1742 - add to knoxshell usage rendering

* KNOX-2188 - Handling discovery details via advanced configuration (#240)

* KNOX-2190 - Processing advanced service discovery configuration on topology level (#242)

* KNOX-1742 - Fix javadoc warning

* KNOX-2196 - Upgrade caffeine to 2.8.1

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2197 - Upgrade dependency-check-maven to 5.3.0

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2198 - Upgrade groovy to 2.5.9

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2192 - Upgrade httpclient to 4.5.11

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2195 - Upgrade jetty to 9.4.26.v20200117

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2193 - Upgrade rest-assured to 4.2.0

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2199 - Upgrade spring-core to 5.2.3.RELEASE

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2194 - Upgrade spring-vault to 2.2.1.RELEASE

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2191 - Upgrade testcontainers to 1.12.5

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2200 - DefaultKeystoreService can lose entries under concurrent access (#243)

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2202 - Knox should use UTF-8 as default encoding instead of ISO-8859-1 (#244)

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2204 - KnoxLine NPE list datasources when directories don't exist (#246)

* KNOX-1742 - add to knoxshell usage rendering

* KNOX-2204 - KnoxLine NPE list datasources when directories don't exist

* KNOX-2203 - Upgrade admin-ui npm dependencies (#245)

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2208 - AclsAuthorizationFilter should log access at DEBUG level (#247)

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2153 - CM discovery - Monitor Cloudera Manager (#239)

* KNOX-2206 - Log exclusion of a discovered service due to configuration issues (#248)

* KNOX-2209 - Improve logging for Knox token handling (#250)

* KNOX-2217 - Upgrade apache pom to 23

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2219 - Upgrade checkstyle to 8.29

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2218 - Upgrade easymock to 4.2

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2220 - Upgrade nimbus-jose-jwt to 8.5

Signed-off-by: Kevin Risden <kr...@apache.org>

* KNOX-2213 - Service Discovery Support for CM UI, API (#249)

* KNOX-2215 - Token service should return a 403 response when the renewer is not white-listed (#251)

* KNOX-2224 - KnoxLine and KnoxShell DataSource and Select Command Alignment (#255)

* KNOX-1742 - add to knoxshell usage rendering

* KNOX-2204 - KnoxLine NPE list datasources when directories don't exist

* KNOX-2224 - KnoxLine and KnoxShell DataSource and Select Command Alignment

Change-Id: I55aef2dd7617baf10c5f9eb7706f61436aa3ad7d

* KNOX-2227 - Strip Leading and Trailing Whitespace from Headers in KnoxShellTable

Change-Id: I7778becab1ffe779350dbdd15472d308fa165f5f

* KNOX-2227 - switch to trim() for java 8

Change-Id: I9b8ba618c13de6bff0edb5c7d318cd28c251fa20

Co-authored-by: Sandor Molnar <sm...@apache.org>
Co-authored-by: Kevin Risden <ri...@users.noreply.github.com>
Co-authored-by: Phil Zampino <pz...@apache.org>
Co-authored-by: Sandeep Moré <mo...@gmail.com>


> Knox should use UTF-8 as default encoding instead of ISO-8859-1
> ---------------------------------------------------------------
>
>                 Key: KNOX-2202
>                 URL: https://issues.apache.org/jira/browse/KNOX-2202
>             Project: Apache Knox
>          Issue Type: Bug
>            Reporter: Kevin Risden
>            Assignee: Kevin Risden
>            Priority: Major
>             Fix For: 1.4.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If you send in an XML doc with unicode characters you get the following:
> {code:java}
> ...
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
>         at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:687)
>         at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2220)
>         at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2126)
>         at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1181)
>         at org.codehaus.stax2.ri.Stax2EventReaderImpl.nextEvent(Stax2EventReaderImpl.java:255)
>         at org.apache.knox.gateway.filter.rewrite.impl.xml.XmlFilterReader.read(XmlFilterReader.java:122)
>         ... 133 more
> {code}
> Knox default falls back to ISO-8859-1 encoding instead of UTF-8.
> I did some research and the default encoding specification has changed over the years. It looks like ISO-8859-1 was the default historically, but currently it should be UTF-8.
> https://stackoverflow.com/questions/58337900/how-to-change-default-character-encoding-configuration-in-jetty-app-server-from
> There are very few cases where ISO-8859-1 and UTF-8 are incompatible and it would be outside the default ASCII charset.
> I also found that the default XML encoding is UTF-8 so even if we don't change all the defaults to UTF-8 we should do so for XML.
> https://www.w3schools.com/xml/xml_syntax.asp



--
This message was sent by Atlassian Jira
(v8.3.4#803005)