Merge pull request #13 from TomConner/next
Fix WEB-151 - tolerate missing user cookie attribute in challenge stage2
This commit is contained in:
commit
3814b35aa8
@ -210,7 +210,12 @@ public class Challenge2Screen extends SequentialLessonAdapter
|
|||||||
.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||||
|
|
||||||
// pull the USER_COOKIE from the cookies
|
// pull the USER_COOKIE from the cookies
|
||||||
String cookie = URLDecoder.decode(getCookie(s),"utf-8");
|
String cookie = getCookie(s);
|
||||||
|
if (null == cookie) {
|
||||||
|
cookie = "";
|
||||||
|
} else {
|
||||||
|
cookie = URLDecoder.decode(cookie,"utf-8");
|
||||||
|
}
|
||||||
|
|
||||||
String user = Encoding.base64Decode(cookie);
|
String user = Encoding.base64Decode(cookie);
|
||||||
String query = "SELECT * FROM user_data WHERE last_name = '" + user + "'";
|
String query = "SELECT * FROM user_data WHERE last_name = '" + user + "'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user