- Timestamp:
- 2019-08-06T11:33:16+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/URLFilter.java
r33347 r33387 495 495 496 496 Element mr_response = (Element)gsRouter.process(securityMessage); 497 logger.debug("security response = "+XMLConverter.getPrettyString(mr_response));497 //logger.debug("security response = "+XMLConverter.getPrettyString(mr_response)); 498 498 499 499 boolean verifiable_file = true; … … 538 538 if (!verify.equals("")) { 539 539 // we are asking for the main document, and we have been asked to verify the user 540 logger.error("KATH verifiable file is true");541 542 540 // have we done the test previously? 543 541 boolean already_verified = false; … … 551 549 // we haven't done this at all, set up the map 552 550 verifiedUserMap = new Hashtable<String, UserTimer>(); 553 logger.error("KATH setting up new user map");554 551 } else { 555 552 // check this map … … 558 555 } 559 556 } 560 logger.error("KATH already verified = "+already_verified);561 557 } 562 558 563 559 if (!already_verified) { 564 560 // have we just done the test? 565 //String hmvf_response = request.getParameter(GSParams.VERIFIED);566 561 // hmvf param will be set by form if the verify page was submitted 567 562 if (hmvf_response != null && hmvf_response.equals("1")) { 568 logger.error("user has submitted the form, check recaptcha response");569 563 if (!securityResponse.getAttribute(GSXML.SITE_KEY_ATT).equals("")) { 570 564 String recaptcha_response = request.getParameter(Authentication.RECAPTCHA_RESPONSE_PARAM); 571 565 String secret_key = securityResponse.getAttribute(GSXML.SECRET_KEY_ATT); 572 566 int result = Authentication.verifyRecaptcha(secret_key, recaptcha_response); 573 logger.error("recaptcha result code = "+result);574 567 if (result == Authentication.NO_ERROR) { 575 logger.error("RECAPTCHA SUCCESS, hopefully going to the document");576 568 already_verified = true; 577 569 … … 603 595 // or we have been asked to force the T&C 604 596 // we need to display the verify page 605 logger.error("KATH display verify page");606 //String new_url = context.getContextPath()+"/"+ context.getAttribute("LibraryName")+"?a=p&sa=verify&c="+collection+"&url="+url;607 597 String new_url = context.getContextPath()+"/"+ library_name+"?a=p&sa=verify&c="+collection+"&url="+url; 608 598 ((HttpServletResponse)response).sendRedirect(new_url); … … 656 646 if (metadataList.getLength() == 0) { 657 647 658 logger.error("Could not find the document related to this url");648 logger.error("Could not find the document ID related to this url"); 659 649 return null; 660 650 }
Note:
See TracChangeset
for help on using the changeset viewer.