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
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'
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
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
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
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
6 matches
Mail list logo