Fork me on GitHub
Subscribe 5

Ticket #640 (fixed bug)

Renaming a user will unban them

  • Created: 2012-03-16 11:58:04
  • Reported by: Lanark
  • Assigned to: Oldskool
  • Milestone: 1.4.9
  • Component: bans
  • Priority: low

I just noticed that renaming a banned account (e.g. because it contains offensive words) will have the side effect of removing their ban.

It's not something that will happen very often but it is a bit counter intuitive.

Thanks

History

Franz 2012-03-16 19:32:50

  • Milestone set to 1.4.9.

Interesting find, thanks for the report! smile

We will take care of this in the next release.

Comment edited 1 times (Diff)

Oldskool 2012-03-20 15:05:21

  • Owner set to Oldskool.

Sounds interesting indeed, will further investigate this and come up with a fix. Thanks for your report!

Oldskool 2012-03-25 21:47:00

Commit d07e4ff to fluxbb fluxbb-1.4

#640 - Renaming banned users will now keep them banned.

Oldskool 2012-03-25 21:50:23

  • Status changed from open to fixed.

All set, updated profile.php to update the bans table as well. Also regenerates the bans cache when a ban was actually updated, to avoid any caching problems. Thanks again for your report, Lanark. Good find! smile

Visman 2012-03-26 00:02:27

if ($db->query('UPDATE '.$db->prefix.'bans SET username=\''.$db->escape($form['username']).'\' WHERE username=\''.$db->escape($old_username).'\'') or error('Unable to update bans', __FILE__, __LINE__, $db->error()))

Here condition superfluous. Truth always, differently mistake.

Oldskool 2012-03-26 19:16:25

Commit 7c039f0 to fluxbb fluxbb-1.4

Fixing faulty ban-update check of #640

Oldskool 2012-03-26 19:18:02

Obviously you are right Visman, just commited a proper update for that. Thanks for pointing it out!

Comment edited 1 times (Diff)

PunKeel 2012-06-27 11:23:51

Hi, I haven't checked the code diff, but why not using ID (or a field in profile) to ban a member ?
It could be faster than an array, and keep bans in memory.

+ Ability to "edit" a ban, by clicking a button in admin panel.

PS: i use 1.2.x and haven't seen this, don't know if it's done in 1.5 hmm