]> git.p6c8.net - jirafeau/pcanterino.git/commit
Add disallowed_extensions config with server and client validation
authorThePeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com>
Mon, 7 Sep 2026 11:02:50 +0000 (13:02 +0200)
committerThePeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com>
Mon, 7 Sep 2026 11:03:42 +0000 (13:03 +0200)
commit08b9270797ef139d44343187cfa545a145021d83
treec5590854713d23ab55ccdfb11e954c6c813fb318
parentf163f30e032ceb21fec3f4f37360ccc8975696a5
Add disallowed_extensions config with server and client validation

Add $cfg['disallowed_extensions'] as a single-purpose blacklist field
(supersedes MR !39's allowed/forbidden approach per maintainer
feedback). Server-side validation runs in both the direct-upload and
async-init branches of script.php, covering browser and CLI/curl
uploads alike. Client-side JS mirrors the existing file-size check,
warning the user and hiding the send button before they submit an
upload with a disallowed extension, and the disallowed list is shown
next to the file-size hint on the upload form.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGzCMiwvovH9jLpoAJZvkF
index.php
lib/config.original.php
lib/functions.js.php
lib/functions.php
lib/locales/en.json
script.php

patrick-canterino.de