anlutro / laravel-4-smart-errors

Smarter error handling for Laravel 4
65 stars 13 forks source link

Add sanitized session data to emails #30

Closed 501st-alpha1 closed 9 years ago

501st-alpha1 commented 9 years ago

Here's my attempt at adding the Session data to the emails (see #26).

I copied the sanitize function from the one in ContextCollector.php, because I couldn't figure out a good way to use the same function for both.

anlutro commented 9 years ago

When you mention it, I see that I've made a mistake. I'm only sanitizing input when writing to log files, assuming that e-mail is done over a secure protocol, which is not always the case.

I think the sanitization stuff can be moved to a trait, which then both the InputPresenter and SessionPresenter use. The ContextCollector will have to be slightly rewritten to use the presenters instead of the raw data.

Do you want to make these changes? Otherwise I can make them, but then you'll probably have to rebase your commits.

501st-alpha1 commented 9 years ago

I'll go ahead and make the changes.

501st-alpha1 commented 9 years ago

I moved the sanitization stuff to a trait, and added that trait to InputPresenter and SessionPresenter. I'm not sure how exactly the ContextCollector should be refactored, so I'll let you take it from here.

anlutro commented 9 years ago

That's fine. Thanks for the work, it's highly appreciated!

501st-alpha1 commented 9 years ago

No prob!