Benjamin W
Benjamin W

Reputation: 2848

Laravel store custom file securely

I'm new in laravel

I have created a captcha.php file content-type image.

I'm not sure where is the best place to be stored securely. I google it and some people said put this file inside of resources folder

Upvotes: 1

Views: 233

Answers (1)

Mohammad Ali
Mohammad Ali

Reputation: 922

I dont think that you've realized that no single folder will be more secure than any other as once an attacker has compromised your computer they will be free to roam through your folders. Also using file permissions that do not permit read access to the folder is a good strategy to prevent an attacker who has compromised a non root account from reading your captcha.php file. But then you would not be able to run said file as a user needs read and execute permissions on the file if you wish to actually run the script.

Upvotes: 1

Related Questions