File tree Expand file tree Collapse file tree
cSploit/src/org/csploit/android/net/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121import android .util .Patterns ;
2222
23+ import org .csploit .android .core .Logger ;
2324import org .csploit .android .net .ByteBuffer ;
2425
2526import java .net .HttpCookie ;
@@ -356,7 +357,14 @@ public static ArrayList<HttpCookie> parseRawCookie(String rawCookie){
356357
357358 String cookieName = rawCookieNameAndValue [0 ].trim ();
358359 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+ }
360368
361369 for (int i = 1 ; i < rawCookieParams .length ; i ++){
362370 String rawCookieParamNameAndValue [] = rawCookieParams [i ].trim ().split ("=" );
You can’t perform that action at this time.
0 commit comments