Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-6312

Backslash is not allowed by Tomcat in URLs by default

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      By default tomcat return a ERROR 400 bad request, if there is backslah (antislash) in the URL. See here :
      public class CoyoteAdapter implements Adapter {
      protected static final boolean ALLOW_BACKSLASH =
      Boolean.valueOf(System.getProperty("org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH", "false")).booleanValue();
      ...

      public static boolean normalize(MessageBytes uriMB) {
      ...

      for (pos = start; pos < end; pos++) {
      if (b[pos] == (byte) '
      ') {
      if (ALLOW_BACKSLASH)

      { b[pos] = (byte) '/'; }

      else

      { return false; }

      So backslash will be forbidden into a document name (as it is used into the path, used for the URL). and will be replaced by a minus character.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: