Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
$_REQUEST cleaning?
Avatar
hArpanet #1
Member since Feb 2013 · 17 posts
Group memberships: Members
Show profile · Link to this post
Subject: $_REQUEST cleaning?
Does DokuWiki perform any automatic cleaning of the $_REQUEST values that is pulls from $_GET and $_POST?

If not, are there any methods for performing cleaning of user-submitted data available for use within plugins?

I am already aware of hsc().

Thanks.
Avatar
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3500 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The Input class does that (See https://www.dokuwiki.org/devel:request_vars). Note: this only checks for correct types, user input still has to be escaped and treated as possible malicious.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
hArpanet #3
Member since Feb 2013 · 17 posts
Group memberships: Members
Show profile · Link to this post
Excellent, that's exactly what I wanted.

Thanks for the link - where would I find that information in the dev manual?  Even with a link to the page I can't find out where it's buried!  8-(
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4733 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Just click on the input class link at the top of the page to get an xref of the class, which has links to the functions.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
andi (Administrator) #5
User title: splitbrain
Member since May 2006 · 3500 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #3
Quote by hArpanet:
Thanks for the link - where would I find that information in the dev manual?  Even with a link to the page I can't find out where it's buried!  8-(

See https://www.dokuwiki.org/devel:request_vars?do=backlink for all the links to that page. It's in Section 1b of the development manual under Environment.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
hArpanet #6
Member since Feb 2013 · 17 posts
Group memberships: Members
Show profile · Link to this post
Got it, thanks andi.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-06, 10:10:40 (UTC +01:00)