• spaces inserted when changing subject

    From Marco Moock@mm+usenet-es@dorfdsl.de to rocksolid.nodes.help on Wed Nov 6 17:10:58 2024
    From Newsgroup: rocksolid.nodes.help

    Hello!

    One of my users reported that a space is inserted when changing the
    subject. https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.
    --
    kind regards
    Marco

    Send spam to 1730909215muell@stinkedores.dorfdsl.de

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.com to rocksolid.nodes.help on Wed Nov 6 09:20:25 2024
    From Newsgroup: rocksolid.nodes.help

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the
    subject. https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the
    specific place you're seeing spaces added.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retro.guy@rocksolidbbs.com to rocksolid.nodes.help on Wed Nov 6 16:37:06 2024
    From Newsgroup: rocksolid.nodes.help

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the
    subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near
    there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.
    --
    Retro Guy
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.com to rocksolid.nodes.help on Thu Nov 7 13:39:48 2024
    From Newsgroup: rocksolid.nodes.help

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the
    subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the
    specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near
    there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.
    --
    Retro Guy
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ulf_Kutzner@Ulf.Kutzner@web.de to rocksolid.nodes.help on Mon Nov 25 10:00:33 2024
    From Newsgroup: rocksolid.nodes.help

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the
    subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the
    specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near
    there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Regards, ULF
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.com to rocksolid.nodes.help on Mon Nov 25 11:01:15 2024
    From Newsgroup: rocksolid.nodes.help

    On Mon, 25 Nov 2024 10:00:33 +0000, Ulf_Kutzner wrote:

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the
    subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the
    specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near
    there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Is this the article where you are seeing the space: https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=210&group=de.etc.bahn.stadtverkehr#210

    If so, I'm not seeing it. I checked the code and the "fix" is still
    there, at least in git. I viewed on the site you reference and do not
    see the space.

    What am I missing?
    --
    Retro Guy
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ulf_Kutzner@Ulf.Kutzner@web.de to rocksolid.nodes.help on Mon Nov 25 11:25:57 2024
    From Newsgroup: rocksolid.nodes.help

    On Mon, 25 Nov 2024 11:01:15 +0000, Retro Guy wrote:

    On Mon, 25 Nov 2024 10:00:33 +0000, Ulf_Kutzner wrote:

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the >>>>>> subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed
    subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the >>>>> specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near
    there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Is this the article where you are seeing the space: https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=210&group=de.etc.bahn.stadtverkehr#210

    If so, I'm not seeing it. I checked the code and the "fix" is still
    there, at least in git. I viewed on the site you reference and do not
    see the space.

    What am I missing?

    What happens if you try to reply to

    Re: Strassenbahnzuege (war: Brueckeneinsturz)
    From: Ignatios Souvatzis
    Date: Sun, 24 Nov 2024 22:27 00100
    Newsgroups: de.etc.bahn.stadtverkehr

    and while changing the subject again,
    put the current subject into brackets again?

    Regards, ULF
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.org to rocksolid.nodes.help on Mon Nov 25 11:49:39 2024
    From Newsgroup: rocksolid.nodes.help

    Ulf_Kutzner wrote:

    On Mon, 25 Nov 2024 11:01:15 +0000, Retro Guy wrote:

    On Mon, 25 Nov 2024 10:00:33 +0000, Ulf_Kutzner wrote:

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the >>>>>>> subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed >>>>>>> subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the >>>>>> specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near >>>>> there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Is this the article where you are seeing the space:
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=210&group=de.etc.bahn.stadtverkehr#210

    If so, I'm not seeing it. I checked the code and the "fix" is still
    there, at least in git. I viewed on the site you reference and do not
    see the space.

    What am I missing?

    What happens if you try to reply to

    Re: Strassenbahnzuege (war: Brueckeneinsturz)
    From: Ignatios Souvatzis
    Date: Sun, 24 Nov 2024 22:27 00100
    Newsgroups: de.etc.bahn.stadtverkehr

    and while changing the subject again,
    put the current subject into brackets again?

    Ok, I see now. It has a space when you are still in the form typing the subject. I will work on that now and post back when I think I have it
    working.

    Thanks!

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.org to rocksolid.nodes.help on Mon Nov 25 11:57:42 2024
    From Newsgroup: rocksolid.nodes.help

    Ulf_Kutzner wrote:

    On Mon, 25 Nov 2024 11:01:15 +0000, Retro Guy wrote:

    On Mon, 25 Nov 2024 10:00:33 +0000, Ulf_Kutzner wrote:

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the >>>>>>> subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed >>>>>>> subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the >>>>>> specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near >>>>> there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Is this the article where you are seeing the space:
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=210&group=de.etc.bahn.stadtverkehr#210

    If so, I'm not seeing it. I checked the code and the "fix" is still
    there, at least in git. I viewed on the site you reference and do not
    see the space.

    What am I missing?

    What happens if you try to reply to

    Re: Strassenbahnzuege (war: Brueckeneinsturz)
    From: Ignatios Souvatzis
    Date: Sun, 24 Nov 2024 22:27 00100
    Newsgroups: de.etc.bahn.stadtverkehr

    and while changing the subject again,
    put the current subject into brackets again?

    I think I have it fixed. If you have time, please give it a try here: https://news.novabbs.org/rocksolid/article-flat.php?id=4252&group=rocksolid.shared.test#4252

    If it's ok, I'll let Marco know the one line to change in post.php if he
    wishes to.

    Thanks again!
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Retro Guy@retroguy@novabbs.com to rocksolid.nodes.help on Mon Nov 25 12:33:56 2024
    From Newsgroup: rocksolid.nodes.help

    On Mon, 25 Nov 2024 11:57:42 +0000, Retro Guy wrote:

    Ulf_Kutzner wrote:

    On Mon, 25 Nov 2024 11:01:15 +0000, Retro Guy wrote:

    On Mon, 25 Nov 2024 10:00:33 +0000, Ulf_Kutzner wrote:

    On Thu, 7 Nov 2024 13:39:48 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:37:06 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 16:20:25 +0000, Retro Guy wrote:

    On Wed, 6 Nov 2024 17:10:58 +0100, Marco Moock wrote:

    Hello!

    One of my users reported that a space is inserted when changing the >>>>>>>> subject.
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=rocksolid.shared.test#209

    Betreff 3 (war: Betreff 2? )

    According to him, it happens when replying to a post with changed >>>>>>>> subject.

    If you need more info, please tell me.

    I think I see. Are they added at the end of the Subject?

    If so, I should be able to trim that, just let me know if that is the >>>>>>> specific place you're seeing spaces added.

    Take a look in post.php (in <webdir>/rocksolid. Find line 64, or near >>>>>> there:

    // Check some header strings for bad characters
    $newsgroups = sanitize_header($newsgroups);
    $subject = sanitize_header($subject);
    $email = sanitize_header($email);

    change line:
    $subject = sanitize_header($subject);

    to:
    $subject = trim(sanitize_header($subject));

    and see if that fixes the issue.

    I have pushed this change to devel.

    Problem found again today while answering to
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=209&group=de.etc.bahn.stadtverkehr#209

    Had been resolved, has re-appered again?

    The space has, of course, been inserted before
    but should be deleted while deleting the old
    subject (the part in brackets which the space precedes).

    Is this the article where you are seeing the space:
    https://pi-dach.dorfdsl.de/rocksolid/article-flat.php?id=210&group=de.etc.bahn.stadtverkehr#210

    If so, I'm not seeing it. I checked the code and the "fix" is still
    there, at least in git. I viewed on the site you reference and do not
    see the space.

    What am I missing?

    What happens if you try to reply to

    Re: Strassenbahnzuege (war: Brueckeneinsturz)
    From: Ignatios Souvatzis
    Date: Sun, 24 Nov 2024 22:27 00100
    Newsgroups: de.etc.bahn.stadtverkehr

    and while changing the subject again,
    put the current subject into brackets again?

    I think I have it fixed. If you have time, please give it a try here: https://news.novabbs.org/rocksolid/article-flat.php?id=4252&group=rocksolid.shared.test#4252

    If it's ok, I'll let Marco know the one line to change in post.php if he wishes to.

    Sounds like it's working now. Here's what is changed, it's just one line
    in <webdir>/rocksolid/post.php (line 535 or near):

    Change: echo ' value="' . htmlspecialchars($subject) . '" ';
    To: echo ' value="' . trim(htmlspecialchars($subject)) . '" ';

    That should do it. It will be in devel later today.
    --
    Retro Guy
    --- Synchronet 3.21a-Linux NewsLink 1.2