Dotclear

Changeset 795:eab85d2136f6 for admin


Ignore:
Timestamp:
02/08/12 21:00:24 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
2.4
Message:

Advisory ID: HTB23074 - 1.3: Sanitize comments.php and posts.php filter parameters

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/comments.php

    r747 r795  
    4545/* Get comments 
    4646-------------------------------------------------------- */ 
    47 $author = isset($_GET['author']) ? $_GET['author'] : ''; 
    48 $status = isset($_GET['status']) ?      $_GET['status'] : ''; 
    49 $type = !empty($_GET['type']) ?         $_GET['type'] : ''; 
    50 $sortby = !empty($_GET['sortby']) ?     $_GET['sortby'] : 'comment_dt'; 
    51 $order = !empty($_GET['order']) ?       $_GET['order'] : 'desc'; 
    52 $ip = !empty($_GET['ip']) ?             $_GET['ip'] : ''; 
     47$author = isset($_GET['author']) ? html::escapeHTML($_GET['author']) : ''; 
     48$status = isset($_GET['status']) ?      html::escapeHTML($_GET['status']) : ''; 
     49$type = !empty($_GET['type']) ?         html::escapeHTML($_GET['type']) : ''; 
     50$sortby = !empty($_GET['sortby']) ?     html::escapeHTML($_GET['sortby']) : 'comment_dt'; 
     51$order = !empty($_GET['order']) ?       html::escapeHTML($_GET['order']) : 'desc'; 
     52$ip = !empty($_GET['ip']) ?             html::escapeHTML($_GET['ip']) : ''; 
    5353 
    5454$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip; 
  • admin/posts.php

    r500 r795  
    138138/* Get posts 
    139139-------------------------------------------------------- */ 
    140 $user_id = !empty($_GET['user_id']) ?   $_GET['user_id'] : ''; 
    141 $cat_id = !empty($_GET['cat_id']) ?     $_GET['cat_id'] : ''; 
    142 $status = isset($_GET['status']) ? $_GET['status'] : ''; 
    143 $selected = isset($_GET['selected']) ?  $_GET['selected'] : ''; 
    144 $month = !empty($_GET['month']) ?       $_GET['month'] : ''; 
    145 $lang = !empty($_GET['lang']) ?         $_GET['lang'] : ''; 
    146 $sortby = !empty($_GET['sortby']) ?     $_GET['sortby'] : 'post_dt'; 
    147 $order = !empty($_GET['order']) ?       $_GET['order'] : 'desc'; 
     140$user_id = !empty($_GET['user_id']) ?   html::escapeHTML($_GET['user_id']) : ''; 
     141$cat_id = !empty($_GET['cat_id']) ?     html::escapeHTML($_GET['cat_id']) : ''; 
     142$status = isset($_GET['status']) ? html::escapeHTML($_GET['status']) : ''; 
     143$selected = isset($_GET['selected']) ?  html::escapeHTML($_GET['selected']) : ''; 
     144$month = !empty($_GET['month']) ?       html::escapeHTML($_GET['month']) : ''; 
     145$lang = !empty($_GET['lang']) ?         html::escapeHTML($_GET['lang']) : ''; 
     146$sortby = !empty($_GET['sortby']) ?     html::escapeHTML($_GET['sortby']) : 'post_dt'; 
     147$order = !empty($_GET['order']) ?       html::escapeHTML($_GET['order']) : 'desc'; 
    148148 
    149149$show_filters = false; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map