This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      The current regular expression for validating 'excluded users' is too restrictive. We use a subversion server which stores the domain name and the username (e.g. MYDOMAIN\myusername) as user. The current pattern \w+ only allows 'word characters'.

      Please extend this pattern with a backslash (and maybe other characters as well, like '-._').

      I found the currently validation implementation in:

      http://svn-mirror.glassfish.org/hudson/trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionSCM.java

      SubversionSCM.java
              private static final Pattern USERNAME_PATTERN = Pattern.compile("\\w+");
      
              /**
               * Validates the excludeUsers field
               */
              public FormValidation doCheckExcludedUsers(@QueryParameter String value) throws IOException, ServletException {
                  for (String user : Util.fixNull(value).trim().split("[\\r\\n]+")) {
                      user = user.trim();
      
                      if ("".equals(user)) {
                          continue;
                      }
      
                      if (!USERNAME_PATTERN.matcher(user).matches()) {
                          return FormValidation.error("Invalid username: " + user);
                      }
                  }
      
                  return FormValidation.ok();
              }
      

            Assignee:
            qlp
            Reporter:
            qlp
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: