Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jan 2012 at 16:54 UTC
Updated:
29 Jul 2014 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
naxoc commentedThis is also an issue in D8.
Comment #2
naxoc commentedOh, and it is only an issue with clean urls on.
Comment #3
naxoc commentedThis issue may not seem like a big deal, but just this week as I was doing a lot of searching for .vimrc files (I am trying to switch to Vim) I had the problem a number of times, so I ended up writing the attached patch.
The reason a 403 will always be sent when clean urls is on is that in Drupal .htaccess there is a rewrite rule that blocks access to any directory starting with a '.'. This is a feature I think we should definitely keep, so the only way to make it possible for Drupal to allow searches starting with '.' is to url-escape an initial period.
The patch introduces a helper function - not sure if that is the way to go, so all input is very welcome. I was also quite unsure what to name the function. There was already a test written for searching numbers, so I just added a number starting with a decimal to a list of things to test for in that function and set clean urls to true. Clean urls should be on in the number test anyway in my opinion.
Comment #4
naxoc commentedTagging
Comment #5
naxoc commented#3: dot-search-1421560-3.patch queued for re-testing.
Comment #7
cweagansFixing tags per http://drupal.org/node/1517250
Comment #8
naxoc commentedThis is still i (small) feature I would love to see in Drupal. All the other cool kids have it!
Here is a reroll.
Comment #9
jacobsanfordRe-rolled!
Comment #10
jhodgdonThis is essentially the same problem as #890058: Searching for ../../admin takes me to the admin page but with a different Apache configuration.
We are addressing this on
#894486: Use the query string for search keys rather than appending them to the URL