Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

You will meet an important person who will help you advance professionally.


rocksolid / Helpdesk / Div Tag

SubjectAuthor
* Div TagAnonymous
`* Re: Div TagAnonymous
 `* Re: Div TagAnonymous
  `- Re: Div TagAnonymous

1
Subject: Div Tag
From: Anonymous
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Thu, 27 May 2021 00:10 UTC
Date: Thu, 27 May 2021 00:10:03 +0000
Subject: Div Tag
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
From: Anonym...@news.novabbs.com (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
X-Rslight-Site: $2y$10$zUUiZhsfhGC8mBEIgWXgZ.Nvj57y62E9eHpeGAy5CfiT6n00KRp1a
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
Organization: novaBBS
Message-ID: <9ffee53e3d7e6af54779d641577b4a37@news.novabbs.com>
View all headers
Hey. I need a bit of help. If there's user input on my website, then how do I make sure that a <div> or </div> tag doesn't ruin my website? I don't use JavaScript and I use PHP. It'd be very useful if you could give advice with ModSecurity WAF. Thanks and any help would be much appreciated.
--
Posted on novaBBS



Subject: Re: Div Tag
From: Anonymous
Newsgroups: rocksolid.shared.helpdesk
Organization: Rocksolid Light
Date: Thu, 27 May 2021 09:01 UTC
References: 1
Path: i2pn2.org!.POSTED.10.136.143.187!not-for-mail
From: Anonym...@news.novabbs.org (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: Div Tag
Date: Thu, 27 May 2021 09:01:47 +0000
Organization: Rocksolid Light
Message-ID: <92b0c75b61d39eb1a7dc34e6bd06f387@news.novabbs.org>
References: <9ffee53e3d7e6af54779d641577b4a37@news.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1"; posting-host="10.136.143.187";
logging-data="13778"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.org
X-Rslight-Site: $2y$10$FZFPA/zl0CjWYjsb34Sok.Vhj5VAQ2mUIF1RH5LexYnh0MURK/n1i
View all headers
Anonymous wrote:

Hey. I need a bit of help. If there's user input on my website, then how do I make sure that a <div> or </div> tag doesn't ruin my website? I don't use JavaScript and I use PHP.

Try using htmlspecialchars() <?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
?>
which should display
<a href='test'>Test</a>
without messing up the page.

It'd be very useful if you could give advice with ModSecurity WAF. Thanks and any help would be much appreciated.

I think ModSecurity is apache, which I haven't used in a while. You should be able to take care of the issue in php code without messing with the web server.
--
Posted on Rocksolid Light


Subject: Re: Div Tag
From: Anonymous
Newsgroups: rocksolid.shared.helpdesk
Organization: novaBBS
Date: Thu, 27 May 2021 16:43 UTC
References: 1 2
Date: Thu, 27 May 2021 16:43:27 +0000
Subject: Re: Div Tag
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.com
From: Anonym...@news.novabbs.com (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
X-Rslight-Site: $2y$10$Puc4Bna7GZk..TXYC0tD6eZjPV59yoX/Q3JEIUpBsqQb7pxGT7BBS
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
References: <9ffee53e3d7e6af54779d641577b4a37@news.novabbs.com> <92b0c75b61d39eb1a7dc34e6bd06f387@news.novabbs.org>
Organization: novaBBS
Message-ID: <5152b35a8ed766f2b90f5a4dde459e27@news.novabbs.com>
View all headers
Thank you for the advice! I'm kind of new, so I didn't know what to do to sanitize user input. I used that and it worked. Thanks!
--
Posted on novaBBS



Subject: Re: Div Tag
From: Anonymous
Newsgroups: rocksolid.shared.helpdesk
Organization: Rocksolid Light
Date: Thu, 27 May 2021 22:47 UTC
References: 1 2 3
Path: i2pn2.org!.POSTED.10.136.143.187!not-for-mail
From: Anonym...@news.novabbs.org (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: Div Tag
Date: Thu, 27 May 2021 22:47:15 +0000
Organization: Rocksolid Light
Message-ID: <a25c9eed692f542d30049b53138b8239@news.novabbs.org>
References: <9ffee53e3d7e6af54779d641577b4a37@news.novabbs.com> <92b0c75b61d39eb1a7dc34e6bd06f387@news.novabbs.org> <5152b35a8ed766f2b90f5a4dde459e27@news.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1"; posting-host="10.136.143.187";
logging-data="19762"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.org
X-Rslight-Site: $2y$10$K6wToRpBKAnqVUTFMiOWsOcTXrNEH3ZRzGnzlymCHp34kI4Ekhwse
View all headers
Anonymous wrote:

Thank you for the advice! I'm kind of new, so I didn't know what to do to sanitize user input. I used that and it worked. Thanks!

Glad it works! Whatever you're working on sounds interesting, maybe you can share a link once you're ready if it's something you can share.

php has a lot of functions so always good to try to handle something in php before doing it in the server. If you share your program at some time, you don't want to require an admin to make changes to the server if it's not necessary.

Hope you're having fun working on your project!
--
Posted on Rocksolid Light


1
rocksolid light 0.7.2
clearneti2ptor