Bug 500736
Summary: | \n characters are being incorrectly escaped on profile review form | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Dogtag Certificate System | Reporter: | Ade Lee <alee> | ||||
Component: | CA | Assignee: | Ade Lee <alee> | ||||
Status: | CLOSED ERRATA | QA Contact: | Chandrasekar Kannan <ckannan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.1 | CC: | awnuk, benl | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-07-22 23:35:16 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 443788 | ||||||
Attachments: |
|
Description
Ade Lee
2009-05-13 21:00:32 UTC
The "proper" fix might be to root out the inputs that have this problem and fix them to return strings with '\n' rather than "\n". This is likely to be deep in the CA code, and may cause problems elsewhere. I'm going to propose a hack instead. Basically , we will change the escapeJavaScriptString() code to specifically treat the case of "\n" as one would treat a newline. See patch. Created attachment 343876 [details]
patch to fix
awnuk , please review.
attachment (id=343876) +awnuk remark on attachment (id=343876) in the line if ((c == 0x5c) && (in[i+1] == 'n')) { i+1 - may cross array boundary and it should be checked if it is lower then array length. check added. [builder@dhcp231-124 common]$ svn ci -m "Bugzilla Bug #500736 - \n characters are being incorrectly escaped on profile review form" pki-common.spec ../../base/common/ Sending base/common/src/com/netscape/cms/servlet/profile/ProfileServlet.java Sending dogtag/common/pki-common.spec Transmitting file data .. Committed revision 456. I tried to request a cert with the following details UID=james2,E=james2,CN=james2\n,OU=ou3\n when the request form is submitted, the above \n is escaped as \\ That is ok. The basic manifestation of this bug was that \n characters that were added by the server in displaying certificate requests were being escaped. The result of this was that when you looked at the certificate request in the agent pages, the page looked very wide (and you could see the escaped \n entries in the key and Key ID. If this is not happening, then the bug can be considered as verified. Vefified. Thanks Ade. |