[ 
http://www.stripesframework.org/jira/browse/STS-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11633#action_11633
 ] 

Frederic Daoud commented on STS-521:
------------------------------------

I've narrowed it down. What's happening is that with <s:option value="">, the 
empty string "" gets encrypted. However, upon submitting that value, it gets 
decrypted as "" and also set as "", instead of being considered as null like a 
plain empty string. So a required=true property gets set as "", which I think 
is not the expected behavior.

I'm not sure if this is an issue with encryption or with parameter binding (why 
does "" gets set in this case instead of being considered as null?)

Thoughts, anyone?


> NPE decrypting null value with @Validate(encrypted=true)
> --------------------------------------------------------
>
>                 Key: STS-521
>                 URL: http://www.stripesframework.org/jira/browse/STS-521
>             Project: Stripes
>          Issue Type: Bug
>          Components: Formatting, Validation
>            Reporter: Ben Gunter
>            Assignee: Ben Gunter
>             Fix For: Release 1.5
>
>         Attachments: stripes-STS-521.patch
>
>
> From the users mailing list...
> Hi Christian,
> I guess the value of the field was null when it's rendered, wasn't it?
> It seems that encrypted field must have a non-null value when it is 
> rendered.
> In my last project, I removed the field when the value is null to 
> workaround the issue.
> <c:if test="${!empty actionBean.user.id}">
> <stripes:hidden name="user.id" />
> </c:if>
> --
> IMHO, it would be nice if null value is encrypted in the same way as 
> normal value because I often use the same form for both editing an 
> existing instance and creating a new instance (as most of you, I suppose).
> Any thoughts?
> Regards,
> Iwao

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to