Commit bbc2526
committed
SECURITY: Enforce redirect to login page
Thanks to Ian Walls for reporting this issue. NOTE: This affects all
modules, not just the Resources module. From his report:
The ajax scripts (ajax_htmldata.php and ajax_processing.php) are not
authenticated. Thus, as a malicious user on the open internet with only
the domain name and path of a CORAL install, I can not only read
usernames and passwords for database platforms (if added by the
institution), but also delete resources from the database and run
arbitrary code.
Examples:
* Read accounts:
curl 'http://coraldemo.library.tamu.edu/resources/ajax_htmldata.php?action=getAccountDetails&resourceID=27'
* Delete a resource:
curl 'http://coraldemo.library.tamu.edu/resources/ajax_processing.php?action=deleteResource&resourceID=27'
* Upload a malicious script:
curl 'http://coraldemo.library.tamu.edu/resources/ajax_processing.php?action=uploadAttachment' -H 'Content-Type: multipart/form-data' -F 'myfile=@/home/user/Desktop/myevilscript.php'
This commit simply causes the script to exit after attempting to forward
to the login page, to prevent any further data from being sent to
disobedient browsers (such as curl). A patch file is also included.
Signed-off-by: Remington Steed <rjs7@calvin.edu>1 parent 7ea2173 commit bbc2526
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
0 commit comments