My favorites
▼
|
Sign in
google-apps-sso-sample
Google Apps Single Sign-On Service Sample Code
Project Home
Downloads
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
8
attachment: PROPER-INFLATER-USAGE-PATCH
(1.1 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- /tmp/ProcessResponseServlet.java.BROKEN 2008-08-28 07:58:45.645912668 -0400
+++ ProcessResponseServlet.java 2008-08-28 08:10:09.334105908 -0400
@@ -82,12 +82,18 @@
byte[] xmlBytes = encodedRequestXmlString.getBytes("UTF-8");
byte[] base64DecodedByteArray = base64Decoder.decode(xmlBytes);
+ // Data must be padded with "dummy" byte since we are using the
+ // nowrap=true constructor.
+ byte[] extraByteArray = new byte[base64DecodedByteArray.length + 1];
+ System.arraycopy(base64DecodedByteArray, 0, extraByteArray, 0, base64DecodedByteArray.length);
+ extraByteArray[base64DecodedByteArray.length] = 0;
+
//Uncompress the AuthnRequest data
//First attempt to unzip the byte array according to DEFLATE (rfc 1951)
try {
Inflater inflater = new Inflater(true);
- inflater.setInput(base64DecodedByteArray);
+ inflater.setInput(extraByteArray);
// since we are decompressing, it's impossible to know how much space we
// might need; hopefully this number is suitably big
byte[] xmlMessageBytes = new byte[5000];
Powered by
Google Project Hosting