File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
cSploit/src/org/csploit/android/net/http Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import android .util .Patterns ;
22
22
23
+ import org .csploit .android .core .Logger ;
23
24
import org .csploit .android .net .ByteBuffer ;
24
25
25
26
import java .net .HttpCookie ;
@@ -356,7 +357,14 @@ public static ArrayList<HttpCookie> parseRawCookie(String rawCookie){
356
357
357
358
String cookieName = rawCookieNameAndValue [0 ].trim ();
358
359
String cookieValue = rawCookieNameAndValue [1 ].trim ();
359
- HttpCookie cookie = new HttpCookie (cookieName , cookieValue );
360
+ HttpCookie cookie ;
361
+
362
+ try {
363
+ cookie = new HttpCookie (cookieName , cookieValue );
364
+ } catch (IllegalArgumentException e ){
365
+ Logger .error ("Invalid cookie. name=" + cookieName + ":" + cookieValue );
366
+ continue ;
367
+ }
360
368
361
369
for (int i = 1 ; i < rawCookieParams .length ; i ++){
362
370
String rawCookieParamNameAndValue [] = rawCookieParams [i ].trim ().split ("=" );
You can’t perform that action at this time.
0 commit comments