0

I am using Jasper Server 4.5.0 32-bit version.

When I click on Next after filling the report name as requested in the first step of scheduling a report in server, it gives me the following error:

The server has encountered an error. Please excuse the inconvenience. 
An error has occurred. Please contact your system administrator. (5321)

Error Log Following:

2012-04-09 17:37:38,940  WARN IntrusionDetector,http-8080-2:449 - [SECURITY FAILURE Anonymous:null@unknown -> /ExampleApplication/IntrusionDetector] Invalid input: context=trigger.timezone-ViewRepository_Schedule_OutputSettings_context, type(AlphaUnderscoreForward)=^[\p{L}\p{M}\p{Pc}\/]*$, input=GMT 05:30
org.owasp.esapi.errors.ValidationException: trigger.timezone-ViewRepository_Schedule_OutputSettings_context: Invalid input. Please conform to regex ^[\p{L}\p{M}\p{Pc}\/]*$ with a maximum length of 100
    at org.owasp.esapi.reference.validation.StringValidationRule.checkWhitelist(StringValidationRule.java:144)
    at org.owasp.esapi.reference.validation.StringValidationRule.checkWhitelist(StringValidationRule.java:160)
    at org.owasp.esapi.reference.validation.StringValidationRule.getValid(StringValidationRule.java:284)
    at org.owasp.esapi.reference.DefaultValidator.getValidInput(DefaultValidator.java:213)
    at com.jaspersoft.jasperserver.api.security.validators.ValidatorImpl.validate(ValidatorImpl.java:345)
    at com.jaspersoft.jasperserver.api.security.validators.ValidatorImpl.validate(ValidatorImpl.java:251)
    at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.validate(WebAppSecurityFilter.java:175)
    at com.jaspersoft.jasperserver.api.security.WebAppSecurityFilter.doFilter(WebAppSecurityFilter.java:82)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
    at com.jaspersoft.jasperserver.war.MultipartRequestWrapperFilter.doFilter(MultipartRequestWrapperFilter.java:90)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.jaspersoft.jasperserver.war.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:67)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:558)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    at java.lang.Thread.run(Thread.java:619)
2012-04-09 17:37:38,972  WARN JSCommonController,http-8080-2:202 - There was a security error
Alex K
  • 22,315
  • 19
  • 108
  • 236
Sahar Hassan
  • 301
  • 3
  • 7
  • 23
  • You can read [this issue](http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=94962) and [this one](http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=97259). – Alex K Apr 09 '12 at 12:36
  • That's for type Email, in my case is type is "type(AlphaUnderscoreForward)" and the second post you shared is mine only. :) – Sahar Hassan Apr 09 '12 at 12:38
  • I see :). You should add the log to the question body – Alex K Apr 09 '12 at 12:41
  • It seems that something wrong with `timezone` on your server. – Alex K Apr 09 '12 at 12:59
  • You can try to change the regular expression in `validation.properties` file. `Validator.AlphaUnderscoreForward` - it is yours – Alex K Apr 09 '12 at 13:00
  • Or you can try to comment `trigger.timezone=AlphaDot,AlphaUnderscoreForward,100,true,trigger.timezone-ViewRepository_Schedule_OutputSettings_context ` string in `esapi\security.properties` file – Alex K Apr 09 '12 at 13:03
  • Commenting the entry in security.properties file worked! Thanks Alex! – Sahar Hassan Apr 09 '12 at 13:20
  • Welcome :) I think you should check the `timezone` settings – Alex K Apr 09 '12 at 13:46
  • 1
    @AlexK, you should post as an answer. It will help future readers. – mdahlman Apr 09 '12 at 18:17
  • @AlexK, the timezone is set as Validator.Timezone=^[\\p{L}\\p{N}_\\/\\:\\+ ]*$ in the validation.properties file. I am from India and should this settings change accordingly? – Sahar Hassan Apr 10 '12 at 04:42
  • @SaharHassan This is a timezone's validator, not the timezone – Alex K Apr 10 '12 at 07:39

1 Answers1

1

To disable the timezone validation you can comment (or remove) this string in jasperserver\WEB-INF\classes\esapi\security.properties file:

trigger.timezone=AlphaDot,AlphaUnderscoreForward,100,true,trigger.timezone-ViewRepository_Schedule_OutputSettings_context

You should check the timezone defined on your server:

  • the default timezone (get with Java - java.util.TimeZone.getDefault());
  • the list with timezones that you have in jasperserver\WEB-INF\applicationContext.xml file for userTimeZonesList bean, timeZonesIds property.

The expression

Validator.AlphaUnderscoreForward=^[\\p{L}\\p{M}\\p{Pc}\\/]*$

from the jasperserver\WEB-INF\classes\esapi\validation.properties file is just a regular expression for the value validation.

Alex K
  • 22,315
  • 19
  • 108
  • 236