Username editable Username editable
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Username editable

Started by StoneHalo, January 12, 2004, 05:09:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

StoneHalo

I have the integration with vBulletin. I noticed when editing a comment it allows them to change their username (the name of the person leaving the comment), this isn't good!

Could a future version only allow the content of the comment to be editable, not the username?

Thanks

Nibbler

I had this issue before here. My solution was to make these changes:

Change:


$update = db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body', msg_author='$msg_author' WHERE msg_id='$msg_id' AND author_id ='" . USER_ID . "' LIMIT 1");


to:


$update = db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body', WHERE msg_id='$msg_id' AND author_id ='" . USER_ID . "' LIMIT 1");


and:


$update = db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body', msg_author='$msg_author' WHERE msg_id='$msg_id' AND author_md5_id ='{$USER['ID']}' AND author_id = '0' LIMIT 1");


to:


$update = db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body' WHERE msg_id='$msg_id' AND author_md5_id ='{$USER['ID']}' AND author_id = '0' LIMIT 1");



Now only admin can change the name of the poster. It would be nice to stop the name box being changeable too, but I couldnt find where to do that.

StoneHalo

Ok, thanks, I'll try that. What file do I make these changes in?

Nibbler


StoneHalo

Thanks Nibbler.

If anyone knows a way to disable the usename being editable when editing a comment please let us know!

Joachim Müller

just made a tracker out of this bugger: #875870

GauGau

StoneHalo

Thanks GauGau  :D I'll keep an eye on it.

Joachim Müller

just committed the changes Nibbler proposd to the devel branch of the cvs and updated the tracker. Waiting for a dev team member to confirm the fix.

GauGau

Flappo

The solution above did not work at mine so i did the following:

i removed

, msg_author='$msg_author'

from

 $update = db_query("UPDATE {$CONFIG['TABLE_COMMENTS']} SET msg_body='$msg_body', msg_author='$msg_author' WHERE msg_id='$msg_id' AND author_id ='" . USER_ID . "' LIMIT 1");

maybe it is not the finest solution, but it works.... if a user changes his name while editing a comment the query does not change the name of the user.. only when you are admin you can change it.....