[web2py] Re: Send Errors To Email

2012-09-28 Thread Dave
using os.popen leaves you potentially vulnerable to attack. I would use a mail API that way you reduce the possibility of shell injection. If someone is crafty enough they may be able to break out of your mail notification and execute arbitrary commands as your web user. Neat approach, I woul

[web2py] Re: Send Errors To Email

2012-09-28 Thread Michael Toomim
If you want a realtime solution, you can trigger an email on each error. Here's a sketch: 1. Add an error handler to routes.py: routes_onerror = [ ('appname/*', '/appname/default/show_error') ] 2. and in default.py: def show_error(): Scheduler.insert(function_name='send_self_email'

[web2py] Re: Send Errors To Email

2012-09-28 Thread Dave
As Niphlod said there is a complete email script in the distro. I am not sure it was there when I created this, but for compliance reasons I had to strip stuff out of the request and session. Cant be emailing credit card numbers around now ;) I just put it in my home directory. you will need

[web2py] Re: Send Errors To Email

2012-09-28 Thread Niphlod
reinventing the wheel is good, but if you don't need "stripping out parts" you can use the default script https://github.com/web2py/web2py/blob/master/scripts/tickets2email.py Il giorno venerdì 28 settembre 2012 16:08:57 UTC+2, Hassan Alnatour ha scritto: > > Dear Dave , > > Where did you add

[web2py] Re: Send Errors To Email

2012-09-28 Thread Hassan Alnatour
Dear Dave , Where did you add this file , and how do you use it ? Best Regards, Hassan Alnatour On Friday, September 28, 2012 6:38:18 AM UTC+3, Dave wrote: > > I have written a script that will load the error pickle file and email me > parts of it. The thing I had to be careful about was com

[web2py] Re: Send Errors To Email

2012-09-27 Thread Dave
I have written a script that will load the error pickle file and email me parts of it. The thing I had to be careful about was compliance. One of my apps is an ecommerce app. If there is an error during the checkout process, there is a chance that sensitive data may be in the error file. In