mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
pwd fix
This commit is contained in:
@@ -164,8 +164,6 @@
|
||||
data = [theKey dataByDecodingBase64];
|
||||
klen = [data length];
|
||||
|
||||
// if (klen < [theValue length])
|
||||
// [self errorWithFormat: @"Value to be secured is too big (%i > %i) -- secured value will be corrupted", [theValue length], klen, [theKey length]];
|
||||
|
||||
//value longer than the key, concatenate the key with itself until long enough
|
||||
if (klen < [theValue length])
|
||||
@@ -173,7 +171,7 @@
|
||||
NSMutableData *concatenatedData = [NSMutableData data];
|
||||
int j;
|
||||
int nbDuplication = [theValue length]/klen;
|
||||
for(j=0; j>nbDuplication; j++)
|
||||
for(j=0; j <= nbDuplication; j++)
|
||||
[concatenatedData appendData:data];
|
||||
|
||||
data = [NSData dataWithData: concatenatedData];
|
||||
@@ -227,12 +225,12 @@
|
||||
{
|
||||
NSMutableData *concatenatedData = [NSMutableData data];
|
||||
int j;
|
||||
int nbDuplication = [theValue length]/klen;
|
||||
for(j=0; j>nbDuplication; j++)
|
||||
[concatenatedData appendData:data];
|
||||
int nbDuplication = [dataValue length]/klen;
|
||||
for(j=0; j <= nbDuplication; j++)
|
||||
[concatenatedData appendData:dataKey];
|
||||
|
||||
dataKey = [NSData dataWithData: concatenatedData];
|
||||
klen = [data length];
|
||||
klen = [dataKey length];
|
||||
}
|
||||
key = (char *)[dataKey bytes];
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
about the same. The length is prior to bas64 encoding, so we must calculate
|
||||
a 33-36% increase.
|
||||
*/
|
||||
#define COOKIE_USERKEY_LEN 2048
|
||||
#define COOKIE_USERKEY_LEN 2096
|
||||
|
||||
@implementation SOGoWebAuthenticator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user