Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Server
Tiny Tiny RSS
Commits
6eaf3193
Commit
6eaf3193
authored
Aug 17, 2012
by
Andrew Dolgov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: disable deprecated HTTP parameter support by default
parent
369dbc19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
api/index.php
api/index.php
+10
-4
No files found.
api/index.php
View file @
6eaf3193
...
...
@@ -29,11 +29,17 @@
$input
=
file_get_contents
(
"php://input"
);
// Override $_REQUEST with JSON-encoded data if available
if
(
$input
)
{
if
(
defined
(
'_API_DEBUG_HTTP_ENABLED'
)
&&
_API_DEBUG_HTTP_ENABLED
)
{
// Override $_REQUEST with JSON-encoded data if available
// fallback on HTTP parameters
if
(
$input
)
{
$input
=
json_decode
(
$input
,
true
);
if
(
$input
)
$_REQUEST
=
$input
;
}
}
else
{
// Accept JSON only
$input
=
json_decode
(
$input
,
true
);
if
(
$input
)
$_REQUEST
=
$input
;
$_REQUEST
=
$input
;
}
if
(
$_REQUEST
[
"sid"
])
{
...
...
Write
Preview
Markdown
is supported
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