Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Improper Access Control security issue: add random string to phot…
…o file name
- Loading branch information
1 parent
24e4406
commit f8b9f81
Showing
11 changed files
with
154 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
This directory holds the student photos. | ||
|
||
You should create one subdirectory for every school year, and store student pictures in as <student_id>.JPG | ||
You should create one subdirectory for every school year, and store student pictures in as <student_id>.<random_string>.jpg | ||
|
||
Note: The random string makes it impossible to predict the file name so photos cannot be accessed without being logged in. | ||
|
||
For example: | ||
|
||
2009 | ||
1.JPG | ||
2.JPG | ||
2010 | ||
1.JPG | ||
2.JPG | ||
2021/ | ||
1.d84cb7b5ffad38b086153f82c1bb27ca.jpg | ||
2.d5e76d354876d7a137abac5bb19ba5bd.jpg | ||
2022/ | ||
1.3f9509cc43cb8e121f50f2a0ef003fdf.jpg | ||
2.8302107827639bc1e7411ed52410dc1e.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
This directory holds the user photos. | ||
|
||
You should create one subdirectory for every school year, and store user pictures in as <user_id>.JPG | ||
You should create one subdirectory for every school year, and store user pictures in as <user_id>.<random_string>.jpg | ||
|
||
Note: The random string makes it impossible to predict the file name so photos cannot be accessed without being logged in. | ||
|
||
For example: | ||
|
||
2009 | ||
1.JPG | ||
2.JPG | ||
2010 | ||
1.JPG | ||
2.JPG | ||
2021/ | ||
1.d84cb7b5ffad38b086153f82c1bb27ca.jpg | ||
2.d5e76d354876d7a137abac5bb19ba5bd.jpg | ||
2022/ | ||
3.3f9509cc43cb8e121f50f2a0ef003fdf.jpg | ||
4.8302107827639bc1e7411ed52410dc1e.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters