Spinoff from #2107789: URLs stripped from first line of emails
Patch has been committed for 6.x-2.x and 7.x-2.x (thanks rclemings).
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | mailhandler-2115975-12.patch | 2.88 KB | rclemings |
| #9 | mailhandler-2115975-9.patch | 2.86 KB | rclemings |
| #4 | mailhandler-2115975-4.patch | 1.88 KB | rclemings |
| #1 | mailhandler-2115975-1.patch | 1.87 KB | rclemings |
Comments
Comment #1
rclemings commentedThis patch is intended to ensure that a line which:
(a) contains a colon,
(b) appears at the top of an email body, and
(c) is not actually a command
is not treated as a command and is not (wrongly) removed from the email body.
The patch examines each line (via function getCommands) and treats the part before the colon as a command only if the same command is listed in available_commands.
So incoming emails with first lines like:
http://drupal.org
Link: http://drupal.org
Hello: world
... which are not really commands, will not be regarded as commands and will remain in the email body rather than being stripped.
(Modifies MailhandlerCommandsDefault.class.php)
Comment #2
danepowell commentedThanks- if the tests pass, I will commit this and be sure to attribute it to you.
Comment #4
rclemings commentedComment #5
rclemings commentedComment #7
rclemings commentedOnly one failure left but I'm not clear on what it is and how to fix it. Suggestions?
Comment #8
danepowell commentedLooks like the default commands for authenticated user are getting applied to anonymous users, so the node is getting published when it shouldn't be.
Comment #9
rclemings commentedComment #10
danepowell commentedhttp://drupalcode.org/project/mailhandler.git/commit/174a171
Comment #11
danepowell commentedComment #12
rclemings commentedThe relevant functions look exactly the same to me so let's see if this works.
Comment #13
rclemings commentedComment #14
danepowell commentedhttp://drupalcode.org/project/mailhandler.git/commit/fff1841
Thanks for contributing. Also, next time please take a look at the Drupal code style guidelines and make sure your code passes Coder Review (you are missing spaces before parentheses).