]> BookStack Code Mirror - bookstack/commit
Prevented possible XSS via link attachments
authorDan Brown <redacted>
Sat, 31 Oct 2020 15:01:52 +0000 (15:01 +0000)
committerDan Brown <redacted>
Sat, 31 Oct 2020 15:01:52 +0000 (15:01 +0000)
commit349162ea139556b2d25e09e155cec84e21cc9227
tree4f6299476135a1addf64288b277288e50df13f12
parent18bcafaee46d249ae4d71ed75872af326c8a87eb
Prevented possible XSS via link attachments

This filters out potentially malicious javascript: or data: uri's coming
through to be attached to attachments.
Added tests to cover.

Thanks to Yassine ABOUKIR (@yassineaboukir on twitter) for reporting this
vulnerability.
app/Http/Controllers/AttachmentController.php
app/Providers/AppServiceProvider.php
app/Uploads/AttachmentService.php
resources/lang/en/validation.php
tests/Uploads/AttachmentTest.php