Skip to content

Commit 804c0b9

Browse files
committed
fixed #377
1 parent e927980 commit 804c0b9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cSploit/src/org/csploit/android/net/http/RequestParser.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import android.util.Patterns;
2222

23+
import org.csploit.android.core.Logger;
2324
import org.csploit.android.net.ByteBuffer;
2425

2526
import 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("=");

0 commit comments

Comments
 (0)