Changeset 3047618
- Timestamp:
- 03/08/2024 06:34:42 AM (2 years ago)
- Location:
- realbig-media/trunk
- Files:
-
- 8 edited
-
README.MD (modified) (1 diff)
-
README.txt (modified) (1 diff)
-
RFWP_AdminPage.php (modified) (3 diffs)
-
realbigForWP.php (modified) (1 diff)
-
templates/adminPage/cache.php (modified) (2 diffs)
-
templates/adminPage/logs.php (modified) (2 diffs)
-
templates/adminPage/sync.php (modified) (1 diff)
-
testFunctions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
realbig-media/trunk/README.MD
r3011727 r3047618 108 108 == Changelog == 109 109 110 = 1.0.7 = 111 112 Изменения версии: 113 114 * добавили защиту от CSRF. 115 110 116 = 1.0.6 = 111 117 -
realbig-media/trunk/README.txt
r3011727 r3047618 108 108 == Changelog == 109 109 110 = 1.0.7 = 111 112 Изменения версии: 113 114 * добавили защиту от CSRF. 115 110 116 = 1.0.6 = 111 117 -
realbig-media/trunk/RFWP_AdminPage.php
r3011727 r3047618 6 6 class RFWP_AdminPage 7 7 { 8 public const CSRF_ACTION = "rfwp_admin_page"; 9 8 10 public static function settingsMenuCreate() { 9 11 global $wp_filesystem; … … 54 56 'turboOptions' => RFWP_generateTurboRssUrls(), 55 57 'tab' => isset($_GET['tab']) ? $_GET['tab'] : null, 58 "_csrf" => wp_create_nonce(self::CSRF_ACTION), 56 59 ]; 57 60 … … 156 159 157 160 public static function clickButtons() { 161 if (empty($_POST["_csrf"]) || !wp_verify_nonce($_POST["_csrf"], self::CSRF_ACTION)) 162 return; 163 158 164 global $wpPrefix; 159 165 -
realbig-media/trunk/realbigForWP.php
r3011727 r3047618 6 6 Plugin name: Realbig Media 7 7 Description: Плагин для монетизации от RealBig.media 8 Version: 1.0. 68 Version: 1.0.7 9 9 Author: Realbig Team 10 10 Author URI: https://realbig.media -
realbig-media/trunk/templates/adminPage/cache.php
r2896400 r3047618 1 1 <?php 2 2 $args = !empty($GLOBALS['rb_adminPage_args']) && !empty($GLOBALS['rb_adminPage_args']['cache']) ? $GLOBALS['rb_adminPage_args']['cache'] : []; 3 $csrf = !empty($GLOBALS['rb_adminPage_args']) && !empty($GLOBALS['rb_adminPage_args']['_csrf']) ? $GLOBALS['rb_adminPage_args']['_csrf'] : ''; 3 4 ?> 4 5 … … 29 30 30 31 <form method="post" class="ml-auto" name="cacheForm" id="cacheFormId"> 31 <?php submit_button( 'Очистить кеш', 'primary', 'clearCache') ?></form> 32 <input type="hidden" name="_csrf" value="<?php echo $csrf ?>" /> 33 <?php submit_button( 'Очистить кеш', 'primary', 'clearCache') ?> 34 </form> 32 35 <?php else: ?> 33 36 Нет закешированных блоков -
realbig-media/trunk/templates/adminPage/logs.php
r2896400 r3047618 16 16 17 17 <form method="post" class="ml-auto" name="logsForm" id="logsFormId"> 18 <?php submit_button( 'Очистить все логи', 'primary', 'clearLogs') ?></form> 18 <input type="hidden" name="_csrf" value="<?php echo $args['_csrf'] ?>" /> 19 <?php submit_button( 'Очистить все логи', 'primary', 'clearLogs') ?> 20 </form> 19 21 <?php else: ?> 20 22 Нет логов на данном сайте … … 27 29 Включить сбор логов</label> 28 30 </div> 31 <input type="hidden" name="_csrf" value="<?php echo $args['_csrf'] ?>" /> 29 32 <?php submit_button( 'Синхронизировать', 'primary', 'enableLogsButton' ) ?> 30 33 </form> -
realbig-media/trunk/templates/adminPage/sync.php
r3011713 r3047618 37 37 <?php endif; ?> 38 38 <?php endif; ?> 39 40 <input type="hidden" name="_csrf" value="<?php echo $args['_csrf'] ?>" /> 39 41 </form> 40 42 -
realbig-media/trunk/testFunctions.php
r3011713 r3047618 6 6 if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON)) && !empty(is_admin()) 7 7 && wp_get_raw_referer() && !wp_get_referer()) { 8 if (!empty($curUserCan)&&!empty($_POST['saveTokenButton'])) { 8 if (!empty($curUserCan) && !empty($_POST['saveTokenButton']) && 9 !empty($_POST["_csrf"]) && wp_verify_nonce($_POST["_csrf"], RFWP_AdminPage::CSRF_ACTION)) { 9 10 if (!empty($_POST['kill_rb'])) { 10 11 $saveVal = 2;
Note: See TracChangeset
for help on using the changeset viewer.