Single file upload plugin – Comment length bug Single file upload plugin – Comment length bug
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Single file upload plugin – Comment length bug

Started by 406man, June 17, 2024, 10:43:48 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

406man

This bug affects comments when uploading an image using the single-file method. The multiple file option is not affected.

The length of a comment is truncated to 512 characters, ignoring the setting "Maximum length of a comment" in the gallery config.

The fault lies in codebase.php in the upload_sgl plugin where the comment length is hard-coded to be 512. It should use the config value $CONFIG['max_com_size']

Line 112 is:

<textarea name="caption" rows="5" cols="40" class="textinput" onkeydown="textCounter(this, 512);" onkeyup="textCounter(this, 512);"></textarea>

Corrected:

<textarea name="caption" rows="5" cols="40" class="textinput" onkeydown="textCounter(this, {$CONFIG['max_com_size']});" onkeyup="textCounter(this, {$CONFIG['max_com_size']});"></textarea>

I've made the change in my 1.6.26 gallery and it works fine.