Results 1 to 1 of 1
- 02-06-2012, 06:33 AM #1
Member
- Join Date
- Feb 2012
- Posts
- 1
- Rep Power
- 0
OWSAP ESAPI Security for french & german locale....
Hi folks,
Iam currently using ESAPI-2.0-rc4.jar for security purpose.
Iam having 2 issues:
First Issue: New Line Issue.
Using Validationg.properties file having the line: Validator.SafeString=^[\p{L}\p{N}\s.]{0,1024}$, but this eliminates my \r\n (LF/CR,the new lines added in the value are removed on validation.).
Using ESAPI.validator().getValidSafeHTML("getValidSafeHT ML",input,instrucLength,true); to validate the "input" string.
If my input string from jsp is as below:
"Value
in
three lines"
The new lines gets eliminated on using getValidSafeHTML and comes as a single line as mentioned below:
"Value in three lines"
The \n\r or the new line is eliminated on using getValidSafeHTML().
Second Issue: Localization:
If my input value contains some french or german characters, it get encoded to its respective unicode
values and hence it becomes difficult to read french or german characters for the user.
For example:
À ---> & Agrave;
à ----> & agrave;
If i have my input value as "Iam À " this gets converted to "Iam & Agrave;" in the UI on successful validation by ESAPI.validator().getValidSafeHTML("getValidSafeHT ML",input,instrucLength,true);
So Both the issues combining is as below:
If my input is as :
"Value in
three lines with some
french characters as À"
This gets changed to a single line with encoded values of french character : "Value in three lines with some french characters as & Agrave;" on succuessful validation.
I need to eliminate this . Is there any way that i can change the Validation.properties(Validator.SafeString=^[\p{L}\p{N}\s.]{0,1024}$) file which will not eliminate my locatization inputs containing newlines.
Similar Threads
-
XML signature is invalid if the XML contains French character
By tbyu in forum XMLReplies: 0Last Post: 11-18-2011, 07:58 AM -
IT Software Consultants JAVA/J2EE/or dot NET (German speaking)
By ICT in forum Jobs OfferedReplies: 0Last Post: 07-02-2011, 12:58 PM -
Lucene search with French words
By Maulin in forum LuceneReplies: 1Last Post: 08-18-2010, 05:06 PM -
How to encode a fileHandler to output french characters ?
By l.najm@acteos.com in forum Advanced JavaReplies: 4Last Post: 04-22-2010, 09:21 AM -
Support for German alphabets
By javaplus in forum New To JavaReplies: 1Last Post: 01-18-2008, 03:45 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks