Revision: 992
http://stripes.svn.sourceforge.net/stripes/?rev=992&view=rev
Author: bengunter
Date: 2008-10-22 19:18:47 +0000 (Wed, 22 Oct 2008)
Log Message:
-----------
Applied fix for STS-555 from the trunk.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/util/CryptoUtil.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/util/CryptoUtil.java
===================================================================
--- branches/1.5.x/stripes/src/net/sourceforge/stripes/util/CryptoUtil.java
2008-10-22 19:14:57 UTC (rev 991)
+++ branches/1.5.x/stripes/src/net/sourceforge/stripes/util/CryptoUtil.java
2008-10-22 19:18:47 UTC (rev 992)
@@ -184,6 +184,10 @@
// First un-base64 the String
byte[] bytes = Base64.decode(input, BASE64_OPTIONS);
+ if (bytes == null || bytes.length < 1) {
+ log.warn("Input is not Base64 encoded: ", input);
+ return null;
+ }
// Then fetch a cipher and decrypt the bytes
Cipher cipher = getCipher(Cipher.DECRYPT_MODE);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development