avatar

596

Always revert the state of the adult login, so it'll retry adult login the next time...

by mrs, 12 Aug, 2008 04:47 PM
563 596  
108108   }
109109 
110110   private static boolean getAdultConfirmation(URLConnection uc_signin, CookieJar cj) throws IOException {
111     boolean enqueued = false;
112111     StringBuffer confirm = Http.receivePage(uc_signin);
113112     ErrorManagement.dump2File("sign_in-a2.html", confirm);
114113     JHTML confirmPage = new JHTML(confirm);
115114 
116115     List<JHTML.Form> confirm_forms = confirmPage.getForms();
116     boolean enqueued = false;
117117     for (JHTML.Form finalForm : confirm_forms) {
118118       if (finalForm.hasInput("MfcISAPICommand", "AdultSignIn")) {
119119         uc_signin = cj.getAllCookiesFromPage(finalForm.getCGI(), null, false);
------
244244     JConfig.setConfiguration(mSiteName + ".adult", "false");
245245     cj = getSignInCookie(cj, username, password);
246246     //  Re-enable adult mode if logging in via non-adult mode still failed...
247     if(cj == null) {
248       JConfig.setConfiguration(mSiteName + ".adult", "true");
249     }
247     JConfig.setConfiguration(mSiteName + ".adult", "true");
250248     return cj;
251249   }
252250 
------
261259         "eBay.  Please fix it in the eBay tab in the Configuration Manager.");
262260   }
263261 
264   public class CaptchaException extends Exception {
262   public static class CaptchaException extends Exception {
265263     private String _associatedString;
266264 
267265     public CaptchaException(String inString) {