From #2291717: Account url alias lead to Forbidden, I discovered that paths that start with . are possible. Web server configuration will often forbid requests to those paths, since dotfiles tend to be special.

CommentFileSizeAuthor
#1 2292017.diff535 bytesdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Status: Active » Needs review
Issue tags: +affects drupal.org
FileSize
535 bytes

I put the filtering toward the end of pathauto_cleanstring() since other filtering may also change the initial characters.

Dave Reid’s picture

Status: Needs review » Postponed (maintainer needs more info)

What is the "Period (.)" punctuation setting set to under admin/config/search/path/settings? By default it should be 'Remove'. Why is that not happening in this case?

Dave Reid’s picture

drumm’s picture

Status: Postponed (maintainer needs more info) » Needs review

We allow periods since usernames allow periods.

Dave Reid’s picture

Hrm, then I'm inclined to say this is a Pathauto misconfiguration issue. I would highly recommend using the 'replace with separator' option for periods instead of leaving them alone.

Unless we can research all the potential prefixes that could be forbidden by all the supported webservers of Drupal, I don't feel like this is warranted.

drumm’s picture

Since core, and Drupal.org, allow both "neil.drumm" and "neil-drumm" usernames, it would be ideal to keep the paths as-is, rather than going into "neil-drumm-0". It is an edge case, but we have plenty of usernames, and this sort of thing does happen.

Drupal.org might need to tackle this in web server configuration instead, since we also have #2272429: Searching for strings and usernames starting with . is forbidden. And someone named "foo.module" will probably get the same forbidden message.

kreynen’s picture

I think I just ran into a user with a user named .John in #2131957: issue when Drupal is not in the web root folder. https://www.drupal.org/user/.john returns a 403 Forbidden.

JKingsnorth’s picture

The 'period' issue also happens in Drupal searches. This issue is being addressed for Drupal.org specifically here: #2272429: Searching for strings and usernames starting with . is forbidden

Dave Reid’s picture

Issue tags: +Needs tests

Ok I've come around on this. Let's add some test coverage to ensure this has coverage.

Dave Reid’s picture

Status: Needs review » Needs work
Dave Reid’s picture

drumm’s picture

Assigned: drumm » Unassigned

I added writing these tests to our internal staff tracker. I'll take a shot at it when it Agiles itself to the top of the backlog. In the meantime, others should feel free to jump in.

Dave Reid’s picture

Dave Reid’s picture

Not sure what the state of this is, seeing as it was fixable from an htaccess standpoint.

drumm’s picture

Issue tags: -affects drupal.org

Yes, this no longer affects Drupal.org.