cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

Server-side named parameters validation is too restrictive about "~", ".", "-" chars #108

Open medvedev opened 7 years ago

medvedev commented 7 years ago

Hi, As for RFC3986, section 2.3, characters "~", ".", "-" are legal besides alphanumeric chars and underscore. Current server-side validation for named parameters (that may be "path" or "query params" URL part) allows alphanumeric chars and underscore only. Here's reference to corresponding code: com.google.api.server.spi.dispatcher.PathTrie: private static final Pattern PARAMETER_NAME_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z_\\d]*");