Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
62baad0f
Commit
62baad0f
authored
12 years ago
by
Martin Doucha
Committed by
Andreas Gohr
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Split act_clean() into two functions so that plugins may use action
string sanitization even for their own new actions
parent
f1d7655b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/actions.php
+13
-3
13 additions, 3 deletions
inc/actions.php
with
13 additions
and
3 deletions
inc/actions.php
+
13
−
3
View file @
62baad0f
...
...
@@ -31,7 +31,7 @@ function act_dispatch(){
if
(
$evt
->
advise_before
())
{
//sanitize $ACT
$ACT
=
act_
clean
(
$ACT
);
$ACT
=
act_
validate
(
$ACT
);
//check if searchword was given - else just show
$s
=
cleanID
(
$QUERY
);
...
...
@@ -184,8 +184,6 @@ function act_sendheaders($headers) {
/**
* Sanitize the action command
*
* Add all allowed commands here.
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
act_clean
(
$act
){
...
...
@@ -206,6 +204,18 @@ function act_clean($act){
if
(
$act
==
'export_htmlbody'
)
$act
=
'export_xhtmlbody'
;
if
(
$act
===
''
)
$act
=
'show'
;
return
$act
;
}
/**
* Sanitize and validate action commands.
*
* Add all allowed commands here.
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function
act_validate
(
$act
)
{
$act
=
act_clean
(
$act
);
// check if action is disabled
if
(
!
actionOK
(
$act
)){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment