0 Members and 1 Guest are viewing this topic.

*

staan

  • *
  • 34
  • Stan, 29 Yo - France
  • osDate Version: osDateEvo v1.3
New line in ABOUT_ME, Private Message, and other textarea
« on: March 09, 2019, 07:42:37 PM »
Hello,

I just saw we cant jump to a new line in ALL TEXTAREA !

If I jump a line, a security remove the new line and merge all content...

Can you help me to restaure the ability  ?

Thank you !

*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #1 on: March 09, 2019, 08:13:54 PM »
Hello staan,

I am not sure what you mean.

What are you trying to do?
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

staan

  • *
  • 34
  • Stan, 29 Yo - France
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #2 on: March 09, 2019, 08:19:58 PM »
If an user send a mail to another with this text :

"hello,
 I'm Ted, how are you ?

See you later !"

It will show on the site :

"Hello, I,m Ted, how are you ?See you later !"

All "jump line" (don't know how to say it in English sorry ) were removed before insert in the SQL database, and not only in private message, on ALL textarea (comments, profile question, etc.)

Can you help me ? I want the jump line back :)

*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #3 on: March 09, 2019, 08:28:15 PM »
Hello Stann,

You will need to upgrade the old osDate to the new osDateEvo for it all to work correctly.

All osDateEvo is, is a updated version of osDate v2.6.5 with heaps of fixes and updates to
get it to work in the latest PHP 5.6 and PHP 7.2.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

staan

  • *
  • 34
  • Stan, 29 Yo - France
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #4 on: March 09, 2019, 08:31:30 PM »
It's not the old osdate, it's the actual osdate Evo version.

*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #5 on: March 09, 2019, 08:36:35 PM »
Hi Stann,

Ok, sorry I can't understand the problem.

Do you have a screenshot so I can see what's wrong?
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #6 on: March 09, 2019, 08:51:51 PM »
Oh ok I see what you mean.

This is a new problem, I just tested it in my Test area and it's doing the same this.

We don't have a fix for this yet, check back later and hopefully we can fix it soon.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

staan

  • *
  • 34
  • Stan, 29 Yo - France
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #7 on: March 10, 2019, 06:41:05 PM »
I think in english it's called :

"BREAK LINE"

When I edit "about_me" in profile_question :



then push Submit button and refresh the profil :



all breakline were removed !

Same problem with comments, or sending private message to another user .


*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #8 on: March 10, 2019, 08:35:59 PM »
Hi Stann,

Here is the fix.

Find the init.php and then find this at the bottom.
Code: [Select]
function checkRequestData() {
    $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS);
    foreach ($_GET as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_GET[$k] = $val;
    }
    foreach ($_POST as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_POST[$k] = $val;
    }
}

Change it to this:
Code: [Select]
function checkRequestData() {
    $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS);
    foreach ($_GET as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_GET[$k] = $val;
    }
    foreach ($_POST as $k => $val) {
        if (! is_array($val)) {
 //           $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_POST[$k] = $val;
    }
}

All done, fixed thanks to CBG.
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35

*

CBG

  • *****
  • 971
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #9 on: March 11, 2019, 10:57:23 AM »
Hi,

We have just found that this does create another issue with the page editor and maybe other pages add the rn in to the text.
This is a temp fix at the moment.
Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

CBG

  • *****
  • 971
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #10 on: March 11, 2019, 11:14:01 AM »
Hi,

While we are working on this to avoid any issues you could do as followed

Open init.php

Find:
Code: [Select]
function checkRequestData() {
    $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS);
    foreach ($_GET as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_GET[$k] = $val;
    }
    foreach ($_POST as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_POST[$k] = $val;
    }
}

Change it to this:
Code: [Select]
function checkRequestData() {
    $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASS);
    foreach ($_GET as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_GET[$k] = $val;
    }
/*
    foreach ($_POST as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_POST[$k] = $val;
    }
*/
}
Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

staan

  • *
  • 34
  • Stan, 29 Yo - France
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #11 on: March 11, 2019, 11:25:12 AM »
Done, working well :)

waiting for the next step

*

CBG

  • *****
  • 971
    • osDate Forum
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #12 on: March 11, 2019, 01:34:12 PM »
Hi,

It maybe a few days as I am busy with other stuff, but we will get a patch out ASAP.
Regards,
CBG (Garry)
PHP: 5.x and 7.x | MySQL: 10.1.31-MariaDB-cll-lve

*

Pharg

  • *****
  • 3,240
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: New line in ABOUT_ME, Private Message, and other textarea
« Reply #13 on: March 11, 2019, 08:35:58 PM »
Hi CBG and Stann,

I found when you commit out only the one line, we then get another problem being the rn issue, however
since I changed it to the way CBG has it like this:
Code: [Select]
/*
    foreach ($_POST as $k => $val) {
        if (! is_array($val)) {
            $val = str_replace("\r\n",'',($val));
            $val = mysqli_real_escape_string($conn,$val );
        }
        $_POST[$k] = $val;
    }
*/
}

This stops the rn issue also, so it is fixed now, your good to go Stann.
« Last Edit: March 11, 2019, 08:38:28 PM by Pharg »
Regards,
Pharg ( Phill )

Don't Personal Message me unless it's about a sensitive matter!!

REMEMBER TO ALWAYS BACKUP BEFORE MAKING ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.2 | MySQL: 5.5.35