From: garvinhicking Date: Thu, 20 Apr 2006 13:59:12 +0000 (+0000) Subject: fix possible xsrf in entry manager X-Git-Tag: 1.0~39 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6d7a4ee2864f09938699d550114fdca096b04dbf;p=s9y.git fix possible xsrf in entry manager --- diff --git a/docs/NEWS b/docs/NEWS index 49bba2c..d44d5df 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.0 () ------------------------------------------------------------------------ + * Fix another (minor) XSRF for entry manager, thanks to Geoff Johnson + (garvinhicking) + * Support "Force Feedburner" option to the syndication plugin to let rss.php only be accessible to feedburner and no clients. (garvinhicking) diff --git a/include/admin/entries.inc.php b/include/admin/entries.inc.php index c7fe843..1430a4f 100644 --- a/include/admin/entries.inc.php +++ b/include/admin/entries.inc.php @@ -255,7 +255,7 @@ function serendipity_drawList() { <?php echo EDIT; ?> - <?php echo DELETE; ?> + <?php echo DELETE; ?> @@ -437,8 +437,11 @@ switch($serendipity['GET']['adminAction']) { break; case 'doDelete': - serendipity_deleteEntry($serendipity['GET']['id']); - printf(RIP_ENTRY, $serendipity['GET']['id']); + if (!serendipity_checkFormToken()) { + break; + } + serendipity_deleteEntry((int)$serendipity['GET']['id']); + printf(RIP_ENTRY, (int)$serendipity['GET']['id']); echo '
'; case 'editSelect': @@ -446,13 +449,16 @@ switch($serendipity['GET']['adminAction']) { break; case 'delete': - $newLoc = '?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=doDelete&serendipity[id]=' . $serendipity['GET']['id']; - printf(DELETE_SURE, $serendipity['GET']['id']); + if (!serendipity_checkFormToken()) { + break; + } + $newLoc = '?' . serendipity_setFormToken('url') . '&serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=doDelete&serendipity[id]=' . (int)$serendipity['GET']['id']; + printf(DELETE_SURE, (int)$serendipity['GET']['id']); ?>

- " class="serendipityPrettyButton"> + " class="serendipityPrettyButton">