Saturday 15 May 2010

tomcat - ALLOW_ENCODED_SLASH on AWS Elasticbeanstalk -


To allow encoded slashes in the URL, I will use the AWS But how do I configure my elastic binostock? (-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH = true) is to use

I created a directory that .exextensions my source bundle tomcat.config with a file In the top-level directory of () with the content of:

  order: allow encoder-slash: command: Export CATALINA_OPTS = "$ CATALINA_OPTS -Dorg.apache.tomcat.util. Buf.UDecoder.ALLOW_ENCODED_SLASH = true "CWD: / Home / ec2-user   

but it seems that it has no effect, it does not appear in these diaries:

  Ls -la / tmp / deployment / application / root / ls -l / var / lib / tomcat7 / webapps / root /    

We also tried to set the ALLOW_ENCODED_SLASH system property through the Edit Configuration dialog in the Elastisk Beanstock Console. But, although the property looks, then the standard still does not allow us to use encoded slashes (% 2F).

We believe that the ALLOW_ENCODED_SLASH system property is properly defined because:

1) We see that Java is the property that starts tomcat:

  / usr / lib / JVM / JRE / bin / java -DAWS_ACCESS_KEY_ID = -DAWS_SECRET_KEY = -DJDBC_CONNECTION_STRING = -DPARAM1 = -DPARAM2 = -DPARAM3 = -DPARAM4 = -DPARAM5 = -Dorg.apache.tomcat.util.buf .UDecoder.ALLOW_ENCODED_SLASH = true -Dhazelcast.native.client = true -Dcom.sun.management.jmxremote -Xdebug -Xrunjdwp: transport = dt_socket, server = y, suspend = n, address = 8765 -XX: MaxPermSize = 256M -Xmx1024m -Xms256m -classpath: /usr/share/tomcat7/bin/bootstrap.jar: / usr / share / tomcat7 / bin / Billa- Juli .jar: /usr/share/java/commons-daemon.jar -Dcatalina.base = / Usr / Share / tomcat7 -Dcatalina.home = / usr / share / tomcat7 -Djava.awt.headless = true -Djava.endorsed Dirs = -Dajava.io.tmpdir = / var / cache / tomcat7 / temp -Djava.util.logging.config.file = / usr / share / tomcat7 / conf / logging.propertie s -Djava.util.logging.manager = Org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.bootstrap start   

2) And because we also get "right" when executing it from our web application:

  System.getProperty ( "org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH")   

does anyone know why Tomket still the encoded slashes Dismissing?

For example, this URL should return a JSON that "the application was not found: A / 1":

  http: // our-site / campaign / Instead, it says:  

Requested URL / v1 / Campaign / App / A / 1 / Application / A% 2F1 / udid / U1

Udid / u1 not found on this server.

This is strange because we have tried the property of ALLOW_ENCODED_SLASH in the local tomac and it works fine.

Recently we tried another property. These people work both in my local TOKET and in the AWS:

  org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH   

I completely I'm surprised. ..: - /

No comments:

Post a Comment