You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Jan Bernhardt (JIRA)" <ji...@apache.org> on 2012/10/09 15:01:32 UTC
[jira] [Created] (SYNCOPE-217) hasTokenExpired check for syncope
user can easily cause nullpointer exception
Jan Bernhardt created SYNCOPE-217:
-------------------------------------
Summary: hasTokenExpired check for syncope user can easily cause nullpointer exception
Key: SYNCOPE-217
URL: https://issues.apache.org/jira/browse/SYNCOPE-217
Project: Syncope
Issue Type: Bug
Components: core
Affects Versions: 1.1.0-incubating
Reporter: Jan Bernhardt
Priority: Minor
public boolean hasTokenExpired() {
return tokenExpireTime.before(new Date());
}
should be changed to:
public boolean hasTokenExpired() {
return tokenExpireTime != null && tokenExpireTime.before(new Date());
}
A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SYNCOPE-217) hasTokenExpired check for syncope
user can easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472352#comment-13472352 ]
Francesco Chicchiriccò commented on SYNCOPE-217:
------------------------------------------------
Please provide a patch and I will be happy to apply it.
> hasTokenExpired check for syncope user can easily cause nullpointer exception
> -----------------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SYNCOPE-217) hasTokenExpired check for syncope
user can easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò updated SYNCOPE-217:
-------------------------------------------
Affects Version/s: (was: 1.1.0-incubating)
1.0.2-incubating
Fix Version/s: 1.1.0-incubating
1.0.3-incubating
> hasTokenExpired check for syncope user can easily cause nullpointer exception
> -----------------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò resolved SYNCOPE-217.
--------------------------------------------
Resolution: Fixed
http://svn.apache.org/viewvc?rev=1396086&view=rev
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch, SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "fabio martelli (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
fabio martelli closed SYNCOPE-217.
----------------------------------
Closed for release 1.0.3-incubating
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch, SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò updated SYNCOPE-217:
-------------------------------------------
Summary: SyncopeUser.hasTokenExpired() can easily cause nullpointer exception (was: hasTokenExpired check for syncope user can easily cause nullpointer exception)
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Jan Bernhardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Bernhardt updated SYNCOPE-217:
----------------------------------
Attachment: SyncopeUser.java.patch
I'm very sorry! I provided bad code in my previous patch... (Copy&Paste issue)
The method should not return "null" but "false"!
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch, SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò reassigned SYNCOPE-217:
----------------------------------------------
Assignee: Francesco Chicchiriccò
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Jan Bernhardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Bernhardt reopened SYNCOPE-217:
-----------------------------------
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch, SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472530#comment-13472530 ]
Hudson commented on SYNCOPE-217:
--------------------------------
Integrated in Syncope-linux-branches #33 (See [https://builds.apache.org/job/Syncope-linux-branches/33/])
[SYNCOPE-217] Manually applying fix against provided patch (Revision 1396086)
[SYNCOPE-217] Patch applied (Revision 1396077)
Result = SUCCESS
ilgrosso :
Files :
* /incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java
ilgrosso :
Files :
* /incubator/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/persistence/beans/user/SyncopeUser.java
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch, SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SYNCOPE-217) hasTokenExpired check for syncope
user can easily cause nullpointer exception
Posted by "Jan Bernhardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Bernhardt updated SYNCOPE-217:
----------------------------------
Description:
public boolean hasTokenExpired() {
return tokenExpireTime.before(new Date());
}
should be changed to:
public boolean hasTokenExpired() {
return tokenExpireTime == null
? false
: tokenExpireTime.before(new Date());
}
A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
was:
public boolean hasTokenExpired() {
return tokenExpireTime.before(new Date());
}
should be changed to:
public boolean hasTokenExpired() {
return tokenExpireTime != null && tokenExpireTime.before(new Date());
}
A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
> hasTokenExpired check for syncope user can easily cause nullpointer exception
> -----------------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.1.0-incubating
> Reporter: Jan Bernhardt
> Priority: Minor
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Francesco Chicchiriccò (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francesco Chicchiriccò resolved SYNCOPE-217.
--------------------------------------------
Resolution: Fixed
http://svn.apache.org/viewvc?rev=1396077&view=rev
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Assignee: Francesco Chicchiriccò
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SYNCOPE-217) SyncopeUser.hasTokenExpired() can
easily cause nullpointer exception
Posted by "Jan Bernhardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNCOPE-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Bernhardt updated SYNCOPE-217:
----------------------------------
Attachment: SyncopeUser.java.patch
> SyncopeUser.hasTokenExpired() can easily cause nullpointer exception
> --------------------------------------------------------------------
>
> Key: SYNCOPE-217
> URL: https://issues.apache.org/jira/browse/SYNCOPE-217
> Project: Syncope
> Issue Type: Bug
> Components: core
> Affects Versions: 1.0.2-incubating
> Reporter: Jan Bernhardt
> Priority: Minor
> Fix For: 1.0.3-incubating, 1.1.0-incubating
>
> Attachments: SyncopeUser.java.patch
>
>
> public boolean hasTokenExpired() {
> return tokenExpireTime.before(new Date());
> }
> should be changed to:
> public boolean hasTokenExpired() {
> return tokenExpireTime == null
> ? false
> : tokenExpireTime.before(new Date());
> }
> A token set to null should never expire to be consistent with the behavior that a token will always be vaild valid (in checkToken method) if it is null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira