Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2011 at 08:47 UTC
Updated:
29 Apr 2022 at 16:08 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedWhat's the link to your sandbox?
Comment #2
jerome.megel commentedHello,
sorry, here is the link: http://drupal.org/sandbox/jerome.megel/1077502
Comment #3
jerome.megel commentedComment #4
dave reidAny reason that we can't improve the existing modules that intercept outgoing e-mails?
http://drupal.org/project/maillog
http://drupal.org/project/mail_logger
Comment #5
dave reidComment #6
jerome.megel commentedHello,
yes actually there is a reason, this module display a popup in a modalframe, you know exactly when the emails are sent.
You don't need to watch in your logs to see sent emails.
Comment #7
jthorson commentedJerome,
You've explained how your module differs from the links that Dave provided, but I suspect that wasn't the intent of his question.
Can you explain why we should approve a new module for this, compared to the option of adding a new 'modal popup' feature to an existing module?
In other words, would you instead consider creating a patch which adds the 'modal popup' feature as an enhancement to the pre-existing http://drupal.org/project/maillog module?
Comment #8
jthorson commentedComment #9
tim.plunkettClosing due to inactivity, feel free to re-open if this was a mistake.
Comment #10
jerome.megel commentedHello,
I've tested http://drupal.org/project/mail_logger and it still send emails when activated, my module doesnt. You will be sure that nobody except you will receive testing emails.
For the module http://drupal.org/project/maillog (excepted that it is still in dev) you can't reroute emails and code source isn't built like I need to display emails in modalframe, that's why I would like to have my own module, it's up to you !
The interest is really that you can see emails when they are sent (you can also reroute and block them). Maybe there are some emails that you don't know they are sent and because you don't go watching your logs you don't even see these mails, and when you are debugging it's more pleasant when you don't need to watch your logs.
Thank you.
P.S: Sorry for my English
Comment #11
joachim commentedI think it's a fair point that logging and testing are two different things: you want a logger to send emails as normal while logging them; you want a tester to show you the emails without sending them.
So, logically, this module shouldn't do any logging of its own, and leave that to a logging module.
Comment #12
jerome.megel commentedActually, my module doesn't log anything it just display outgoing emails in a modalframe.
I talked about the log modules because in post #4 and #7 they suggest me to use them instead of mine, and I've explained how they are different.
Thanks
Comment #13
joachim commented> Actually, my module doesn't log anything it just display outgoing emails in a modalframe.
That's perfect then!
Comment #14
jerome.megel commentedIs email_tester module accepted then ?
Comment #15
joachim commentedWell, I think it's justified in being a project alongside the mail logging modules, as I think they cover different, complementary areas. Though you should ensure that they work well together.
Still needs a code review! :)
Comment #16
jerome.megel commentedOk thank you,
what exactly should I review ?
I think the code is good because I have already corrected everything: http://drupal.org/node/885534
Comment #17
sreynen commentedHi jerome.megal,
I created some issues in your project issue queue. Please set this back to "needs review" when those are fixed.
Comment #18
jerome.megel commentedHello,
I've fixed all issues, there is one in "needs review" state
Thanks
Comment #19
sreynen commentedThis looks good to me.
Comment #20
dave reidHas the following code been tested to see if it is vulnerable to XSS at all? The outputting of variables directly in a theme function is kind of a big red flag.
Comment #21
jthorson commentedA few more issues:
<script>alert('xss!');</script>must not result in a pop-up.)PHP Fatal error: Call to undefined function jquery_ui_add() in /var/www/d6/sites/all/modules/email_tester/email_tester.module on line 19This resulted in WSOD when visiting admin/build/modules. I had to manually disable the module in the database. To avoid this, you should leverage hook_requirements() to validate the proper installation of jquery_ui before allowing email_tester to be enabled.
In addition, Coder reports the following issues:
email_tester.module
email_tester.install
Comment #22
jerome.megel commentedHello,
all issues have been fixed
Comment #23
jthorson commentedThanks for the quick changes!
Generally, I would suggest using check_plain() over filter_xss() for the sanitization checks, unless that variable could legitimately hold HTML tags ... though both will achieve the desired result, check_plain() is probably lighter from a performance perspective.
With regards to the themeroller css files/images ... can you provide a link to some information which discusses the license terms regarding use of the themeroller-generated items? Any included
codecomponent that is not your own needs to be re-useable under a GPLv2 license.And even if the output is useable under a GPLv2 license, I would recommend that the module only include the bare minimum css required to function - To illustrate, consider what would happen if a user installed two different modules on their site, both which have used themeroller to generate their css output. Since the themeroller files contain the same element names for both modules, you're going to run into css namespace conflicts ... or your module could be responsible for over-riding the jquery UI datepicker used in other areas of the site, forcing the site maintainer on a wild goose chase trying to find what broke things.
I would suggest minimalizing the css, and adding namespacing to the .css file definitions ... this is probably not a show-stopper for the application (though the license issue could be), but I'd at least give it a strong consideration.
Comment #24
jerome.megel commentedI've used check_plain() function instead of filter_xss()
And for the CSS problem, I have used default jQuery ui theme and added some requirements , it will be OK this way ??
Thank you
Comment #25
jthorson commentedHmmm ... I remember typing this yesterday, but it appears it didn't submit ...
filter_xss() is probably the better choice for the email body, in case you're sending html emails. The check_plain() on the rest looks good.
And a big +1 for going with the default jquery UI theme. :)
Comment #26
gregglesThanks for your contribution, jerome.megel! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in minde: Commit messages - providing history and credit and Release naming conventions.
Comment #28
avpadernoI am giving credits to the users who participated in this issue.
Comment #29
avpadernoComment #31
jerome.megel commented