1

Topic: Bug with nicknames containing a ' ; unable to post messages

When logged under a nickname containing à ', it is impossible to post any message. I get the error: " Erreur. Le lien que vous avez suivi est incorrect ou périmé." after submitting it. (sorry, my forum is configured in french). It means something like: "Error, the link is incorrect".

Removing the ' from the nickname allows the user to post message again.
Thx for your help, keep up the good work, punbb is a great forum smile

Re: Bug with nicknames containing a ' ; unable to post messages

Hello.

With post message, you mean the PrivateMessageSystem-mod?

Which version do you use? I know this have been a problem before, so I can probably make a fix for you.

3 (edited by Simple Exploding Man 2004-04-16 09:48)

Re: Bug with nicknames containing a ' ; unable to post messages

Uhm, he's right, I checked it. I'm using 1.1.3.

Edit. No mods, I changed some code but didn't install any mod.

4

Re: Bug with nicknames containing a ' ; unable to post messages

No, just answering any topic. I'm using v 1.1.3.

Re: Bug with nicknames containing a ' ; unable to post messages

Yann wrote:

No, just answering any topic. I'm using v 1.1.3.

Okay, great, then it's not my fault :P

Re: Bug with nicknames containing a ' ; unable to post messages

Hmm, I just tried registering with the username t'ast and it works for me. Perhaps it's related to magic_quotes.

Yann: Go to your admin interface index page, click the link "Show info", look up magic_quotes_gpc and tell me if it's on or off (both local and master value).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Bug with nicknames containing a ' ; unable to post messages

magic_quotes_gpc "on" here, both.

(I have the problem too).

Re: Bug with nicknames containing a ' ; unable to post messages

I will have a look at it tomorrow.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Bug with nicknames containing a ' ; unable to post messages

Open up post.php and look for

if (($cookie['is_guest'] && $_POST['form_user'] != 'Guest') || (!$cookie['is_guest'] && $_POST['form_user'] != $cur_user['username']))

It should be on row 43. Replace it with

if (($cookie['is_guest'] && $_POST['form_user'] != 'Guest') || (!$cookie['is_guest'] && unescape($_POST['form_user']) != $cur_user['username']))

Does that help?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Bug with nicknames containing a ' ; unable to post messages

Yes, it works now, thanks :).

Re: Bug with nicknames containing a ' ; unable to post messages

Ok, good. I'll put it in the next release.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Bug with nicknames containing a ' ; unable to post messages

I created a user named:

1 " 2 ' 3

I can post, but when I try to ban the account the nickname in the form is truncated just before the double quote. If I invert the quotes (first the simple one and then the double one) I see the single quote is fine. Mmm...

Of course I can add the rest (" 2 ' 3) manually. Just to send feedback:).

Re: Bug with nicknames containing a ' ; unable to post messages

Hmm, ok. I'll check it out.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Bug with nicknames containing a ' ; unable to post messages

Fixed.

"Programming is like sex: one mistake and you have to support it for the rest of your life."