Opened 13 years ago
Closed 11 years ago
#25733 closed defect (bug) (wontfix)
Cannot activate a plugin with a plus (+) symbol in the plugin name
| Reported by: | godhulii_1985 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugins | Version: | 3.8 |
| Severity: | normal | Keywords: | has-patch dev-feedback close |
| Cc: | Focuses: |
Description
I created a plugin having "+" in filename (allowed in windows) and found an error to activate the plugin. After searching a lot, it seems that the problem is in .php, you can find how this problem was reported in drupal community and their thoughts here: https://drupal.org/node/615418
To repeat this bug you just need to rename a plugin with "+" symbol in the filename and try to activate. The activation url becomes:
http://localhost/wordpress/wp-admin/plugins.php?action=activateplugin=hello+dolly%2Fhello.php&_wpnonce=XXXXXX
I tried to replace the + symbol in query string with %2B (its unicode value), this activated the plugin but also said: A fatal error occured, the plugin cannot be activate.
I messed up the process to repeat, so writing again:
- Rename a folder with + character in its filename
- Try to activate
- An error will occur, = First observation of error
- Now replace the + symbol with %2B and try again
- The plugin will be activated but in the status it will say it was not activated and an error occured = Second observation of error
In my opinion, although it might be an issue with the programming language, but wordpress can obviously inform coders about this.
Attachments (1)
Change History (10)
#1
@
13 years ago
- Summary Plus (+) symbol in plugin name cannot activate this → Cannot activate a plugin with a plus (+) symbol in the plugin name
#3
in reply to: ↑ 2
@
13 years ago
Replying to mauryaratan:
There are certain characters which cannot be used as file name since they are reserved symbols and + is among one of the others:
; / ? : @ & = + $ ,Let's see if anyone around got a solution for this.
I am in windows-8 and I can rename files with + in it. Maybe + is reserved in Linux?
#4
@
13 years ago
Renaming files with those character can be done on any OS I guess. Btw, it should accept + in URLs.
I just tested it and was able to replicate the issue. I made a small patch which fixes the issue - 25733.diff
#7
@
11 years ago
- Keywords close added
- Owner set to
- Status new → assigned
@mauryaratan: Using urlencode() here probably won't work since the value sent in the request is the path/to/file+name.php.
@dd32: Is "+" something we want to support/handle in plugin filenames? Reproduced on latest trunk.
#8
@
11 years ago
- Owner removed
Personally I'm not really interested in supporting plugins which use something other than [a-zA-Z0-9_-] as their folder name, we refer to that path in multiple places and use it for a wide range of keys.
Since we don't currently support it, I don't see a need to add support for it really.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
There are certain characters which cannot be used as file name since they are reserved symbols and + is among one of the others:
Let's see if anyone around got a solution for this.