Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SAMBUMBA
pasteque-server
Commits
5a40b004
Commit
5a40b004
authored
Mar 11, 2017
by
Karamel
Browse files
Fix nasty js file inclusion with a security hole
parent
877f198c
Changes
2
Hide whitespace changes
Inline
Side-by-side
dbimg.php
View file @
5a40b004
...
...
@@ -124,10 +124,5 @@ case 'barcode':
case
'custcard'
:
generate_barcode
(
"code128"
,
$_GET
[
'code'
]);
break
;
case
'js'
:
$file
=
$_GET
[
'id'
];
$file
=
str_replace
(
".."
,
"."
,
$file
);
require_once
(
PT
::
$ABSPATH
.
"/templates/"
.
$config
[
'template'
]
.
"/"
.
$file
);
break
;
}
?>
templates/pasteque/module.php
View file @
5a40b004
...
...
@@ -33,7 +33,9 @@ function tpl_open() {
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
<?php
echo
get_template_url
();
?>
/js/pepper-grinder/jquery-ui-1.10.4.custom.css"
/>
<script
type=
"text/javascript"
src=
"
<?php
echo
get_template_url
();
?>
/js/jquery-1.9.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"
<?php
echo
get_template_url
();
?>
/js/jquery-ui-1.10.4.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"?
<?php
echo
\
Pasteque\PT
::
URL_ACTION_PARAM
;
?>
=img&w=js&id=js/pasteque.js.php"
></script>
<script
type=
"text/javascript"
>
<?php
require_once
(
dirname
(
__FILE__
)
.
'/js/pasteque.js.php'
);
?>
</script>
</head>
<body>
<?php
tpl_menu
();
?>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment