git.cweiske.de
/
anoweco.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8911cee
)
Correctly inspect POST content type
author
Christian Weiske
<cweiske@cweiske.de>
Fri, 29 Sep 2017 20:41:29 +0000
(22:41 +0200)
committer
Christian Weiske
<cweiske@cweiske.de>
Fri, 29 Sep 2017 20:41:29 +0000
(22:41 +0200)
www/micropub.php
patch
|
blob
|
history
diff --git
a/www/micropub.php
b/www/micropub.php
index b76d997f609285ed867188f220407692d66f2ae9..eff6ea7f26fde64042859ad3a79d36fa06e486fb 100644
(file)
--- a/
www/micropub.php
+++ b/
www/micropub.php
@@
-165,7
+165,8
@@
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
'Content-Type header missing.'
);
}
'Content-Type header missing.'
);
}
- $ctype = $_SERVER['CONTENT_TYPE'];
+ list($ctype) = explode(';', $_SERVER['CONTENT_TYPE'], 2);
+ $ctype = trim($ctype);
if ($ctype == 'application/x-www-form-urlencoded') {
if (!isset($_POST['action'])) {
$_POST['action'] = 'create';
if ($ctype == 'application/x-www-form-urlencoded') {
if (!isset($_POST['action'])) {
$_POST['action'] = 'create';