Invalid or Missing CSRF Token. Try Going Back and Refresh the page after clearing the browser cache…
LOG file::::
WARN - Slf4JLogger.log(41) |2022-01-15T18:11:36,246| Failed to restore the auto commit to true
[INFO] Started o.e.j.m.p.JettyWebAppContext@73971965{OpenMRS,/openmrs,file:///D:/Office%20Projects/temp/mrs/openmrs-core/webapp/src/main/webapp/,AVAILABLE}{file:///D:/Office%20Projects/temp/mrs/openmrs-core/webapp/src/main/webapp/}
[INFO] Started ServerConnector@7c385f68{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[INFO] Started @39152ms
[INFO] Started Jetty Server
[INFO] Initializing Spring DispatcherServlet ‘openmrs’
WARN - OpenmrsJspServlet.rescanTldsIfNeeded(56) |2022-01-15T18:11:43,930| Rescanning TLDs
[INFO] Warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to default JarScanner implementation.
[INFO] At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[INFO] Initializing Spring StaticDispatcherServlet ‘openmrs_static_content’
ERROR - Log.execute(73) |2022-01-15T18:11:52,129| potential cross-site request forgery (CSRF) attack thwarted (user:, ip:[0:0:0:0:0:0:0:1], method:POST, uri:/openmrs/ms/legacyui/loginServlet, error:Required Token is missing from the Request)
WARN - CsrfGuardFilter.logInvalidRequest(136) |2022-01-15T18:11:52,139| Invalid request: URI: ‘/openmrs/ms/legacyui/loginServlet’ | Remote Address: ‘[0:0:0:0:0:0:0:1]’
ERROR - Log.execute(73) |2022-01-15T18:15:23,813| potential cross-site request forgery (CSRF) attack thwarted (user:, ip:[0:0:0:0:0:0:0:1], method:POST, uri:/openmrs/ms/legacyui/loginServlet, error:Required Token is missing from the Request)
WARN - CsrfGuardFilter.logInvalidRequest(136) |2022-01-15T18:15:23,814| Invalid request: URI: ‘/openmrs/ms/legacyui/loginServlet’ | Remote Address: ‘[0:0:0:0:0:0:0:1]’
@jwnasambu this helps except for the case when I have to create a new patient, program, or any other entity. While saving a new patient, this appears every time even after clearing the cache.
In your openmrs application data folder, look for a file named csrfguard.properties and change the value of the property named org.owasp.csrfguard.Enabled to true. Then restart OpenMRS.
Am using refApp QA server to run the selenium-cucumber test for OCL Subscription feature. When I run npm run refapp2OpenConceptLab this is the error that is displayed on my terminal Deniss-Air:qaframework-bdd-tests juliet$ npm run refapp2OpenConceptLab> open - Pastebin.com and on the server side the error is displayed on the snapshot below. Am firefox as my browser to run the tests.