new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

OWASP Cheat Sheets · all subjects

logging/file_upload

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

upload_complete event logging

Log successful file uploads with event name 'upload_complete' followed by userid, filename, and file type. Level is INFO. This represents the first step in the validation process that the upload has completed. Example: event='upload_complete:joebob1,user_generated_content.png,PNG'.

upload_stored event logging

Log when a file is moved/renamed and stored with event name 'upload_stored' followed by original filename and new storage identifier/key. Level is INFO. Never reference the original filename in subsequent downloads. Example: event='upload_stored:user_generated_content.png,kjsdhkrjhwijhsiuhdf000010202002'.

upload_validation event logging

Log file upload validation results with event name 'upload_validation' followed by filename and validation results in format 'validator:(FAILED|incomplete|passed)'. Level is INFO for passed, CRITICAL for failed. Validators include virusscan, imagemagick, etc. Example: event='upload_validation:filename,virusscan:FAILED'.

upload_delete event logging

Log file deletions with event name 'upload_delete' followed by userid and fileid. Level is INFO. Example: event='upload_delete:joebob1,abcdefghijk101010101'.

Give your agent this brain