Version Description
- Fix XSS in referrers log
Download this release
Release Info
| Developer | johnny5 |
| Plugin | |
| Version | 2.2.10 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.9 to 2.2.10
- matches/user_agent.php +3 -1
- models/log.php +2 -2
- readme.txt +3 -0
- redirection.php +1 -1
- view/admin/log_item.php +4 -4
- view/admin/log_item_details.php +4 -4
matches/user_agent.php
CHANGED
|
@@ -26,7 +26,7 @@ class Agent_Match extends Red_Match {
|
|
| 26 |
function name() {
|
| 27 |
return __( 'URL and user agent', 'redirection' );
|
| 28 |
}
|
| 29 |
-
|
| 30 |
function show() {
|
| 31 |
$defined = array(
|
| 32 |
'feedburner|feedvalidator' => __( 'FeedBurner', 'redirection' ),
|
|
@@ -35,6 +35,8 @@ class Agent_Match extends Red_Match {
|
|
| 35 |
'Opera' => __( 'Opera', 'redirection' ),
|
| 36 |
'Safari' => __( 'Safari', 'redirection' ),
|
| 37 |
'iPhone' => __( 'iPhone', 'redirection' ),
|
|
|
|
|
|
|
| 38 |
'Wii' => __( 'Nintendo Wii', 'redirection' ),
|
| 39 |
);
|
| 40 |
|
| 26 |
function name() {
|
| 27 |
return __( 'URL and user agent', 'redirection' );
|
| 28 |
}
|
| 29 |
+
|
| 30 |
function show() {
|
| 31 |
$defined = array(
|
| 32 |
'feedburner|feedvalidator' => __( 'FeedBurner', 'redirection' ),
|
| 35 |
'Opera' => __( 'Opera', 'redirection' ),
|
| 36 |
'Safari' => __( 'Safari', 'redirection' ),
|
| 37 |
'iPhone' => __( 'iPhone', 'redirection' ),
|
| 38 |
+
'iPad' => __( 'iPad', 'redirection' ),
|
| 39 |
+
'Android' => __( 'Android', 'redirection' ),
|
| 40 |
'Wii' => __( 'Nintendo Wii', 'redirection' ),
|
| 41 |
);
|
| 42 |
|
models/log.php
CHANGED
|
@@ -128,7 +128,7 @@ class RE_Log {
|
|
| 128 |
|
| 129 |
function show_url ($url)
|
| 130 |
{
|
| 131 |
-
return implode ('​/', explode ('/', substr (
|
| 132 |
}
|
| 133 |
|
| 134 |
function delete ($id)
|
|
@@ -187,4 +187,4 @@ class RE_Log {
|
|
| 187 |
}
|
| 188 |
|
| 189 |
|
| 190 |
-
?>
|
| 128 |
|
| 129 |
function show_url ($url)
|
| 130 |
{
|
| 131 |
+
return implode ('​/', explode ('/', substr (esc_html ($url), 0, 80))).(strlen ($url) > 80 ? '...' : '');
|
| 132 |
}
|
| 133 |
|
| 134 |
function delete ($id)
|
| 187 |
}
|
| 188 |
|
| 189 |
|
| 190 |
+
?>
|
readme.txt
CHANGED
|
@@ -87,6 +87,9 @@ Full documentation can be found on the [Redirection](http://urbangiraffe.com/plu
|
|
| 87 |
|
| 88 |
== Changelog ==
|
| 89 |
|
|
|
|
|
|
|
|
|
|
| 90 |
= 2.2.9 =
|
| 91 |
* Fix XSS in admin menu
|
| 92 |
* Update Russian translation, thanks to Alexey Pazdnikov
|
| 87 |
|
| 88 |
== Changelog ==
|
| 89 |
|
| 90 |
+
= 2.2.10 =
|
| 91 |
+
* Fix XSS in referrers log
|
| 92 |
+
|
| 93 |
= 2.2.9 =
|
| 94 |
* Fix XSS in admin menu
|
| 95 |
* Update Russian translation, thanks to Alexey Pazdnikov
|
redirection.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Redirection
|
| 4 |
Plugin URI: http://urbangiraffe.com/plugins/redirection/
|
| 5 |
Description: Manage all your 301 redirects and monitor 404 errors
|
| 6 |
-
Version: 2.2.
|
| 7 |
Author: John Godley
|
| 8 |
Author URI: http://urbangiraffe.com
|
| 9 |
============================================================================================================
|
| 3 |
Plugin Name: Redirection
|
| 4 |
Plugin URI: http://urbangiraffe.com/plugins/redirection/
|
| 5 |
Description: Manage all your 301 redirects and monitor 404 errors
|
| 6 |
+
Version: 2.2.10
|
| 7 |
Author: John Godley
|
| 8 |
Author URI: http://urbangiraffe.com
|
| 9 |
============================================================================================================
|
view/admin/log_item.php
CHANGED
|
@@ -8,16 +8,16 @@
|
|
| 8 |
</a>
|
| 9 |
</td>
|
| 10 |
<td class="info">
|
| 11 |
-
<a class="details" href="<?php echo $log->url ?>"><?php echo $log->show_url
|
| 12 |
</td>
|
| 13 |
<td>
|
| 14 |
<?php if (strlen ($log->referrer) > 0) : ?>
|
| 15 |
-
<a href="<?php echo $this->url ($log->referrer) ?>"><?php echo $log->show_url
|
| 16 |
<?php endif; ?>
|
| 17 |
</td>
|
| 18 |
<td style="width:9em" class="center">
|
| 19 |
-
<a target="_blank" href="<?php echo $lookup
|
| 20 |
</td>
|
| 21 |
<td style="width: 16px" class="lastcol">
|
| 22 |
<a href="#add" class="add-log"><img src="<?php echo $this->url () ?>/images/add.png" width="16" height="16" alt="Add"/></a>
|
| 23 |
-
</td>
|
| 8 |
</a>
|
| 9 |
</td>
|
| 10 |
<td class="info">
|
| 11 |
+
<a class="details" href="<?php echo esc_attr( $log->url ) ?>"><?php echo $log->show_url( $log->url ) ?></a>
|
| 12 |
</td>
|
| 13 |
<td>
|
| 14 |
<?php if (strlen ($log->referrer) > 0) : ?>
|
| 15 |
+
<a href="<?php echo esc_attr( $this->url ( $log->referrer) ) ?>"><?php echo $log->show_url( $log->referrer() ) ?></a>
|
| 16 |
<?php endif; ?>
|
| 17 |
</td>
|
| 18 |
<td style="width:9em" class="center">
|
| 19 |
+
<a target="_blank" href="<?php echo $lookup.esc_attr( $log->ip ) ?>"><?php echo esc_html( $log->ip ) ?></a>
|
| 20 |
</td>
|
| 21 |
<td style="width: 16px" class="lastcol">
|
| 22 |
<a href="#add" class="add-log"><img src="<?php echo $this->url () ?>/images/add.png" width="16" height="16" alt="Add"/></a>
|
| 23 |
+
</td>
|
view/admin/log_item_details.php
CHANGED
|
@@ -2,23 +2,23 @@
|
|
| 2 |
<table style="width: 100%">
|
| 3 |
<tr>
|
| 4 |
<th><a href="<?php echo $log->url ?>"><?php _e ('Source URL', 'redirection'); ?>:</a></th>
|
| 5 |
-
<td><input style="width: 95%" type="text" name="something" readonly="readonly" value="<?php echo
|
| 6 |
</tr>
|
| 7 |
<?php if ($log->sent_to) : ?>
|
| 8 |
<tr>
|
| 9 |
<th><a href="<?php echo $log->sent_to ?>"><?php _e ('Redirect to', 'redirection'); ?>:</a></th>
|
| 10 |
-
<td><input style="width: 95%" type="text" name="something" readonly="readonly" value="<?php echo
|
| 11 |
</tr>
|
| 12 |
<?php endif; ?>
|
| 13 |
<?php if ($redirect && isset($redirect->method) && $redirect->method) : ?>
|
| 14 |
<tr>
|
| 15 |
<th><?php _e ('Redirected by', 'redirection'); ?>:</th>
|
| 16 |
-
<td><?php echo $redirect->method->name () ?> <?php _e ('for', 'redirection'); ?>: <code><?php echo
|
| 17 |
</tr>
|
| 18 |
<?php endif; ?>
|
| 19 |
<tr>
|
| 20 |
<th><?php _e ('User Agent', 'redirection'); ?>:</th>
|
| 21 |
-
<td><input style="width: 95%" type="text" readonly="readonly" name="other" value="<?php echo
|
| 22 |
</tr>
|
| 23 |
<tr>
|
| 24 |
<td></td>
|
| 2 |
<table style="width: 100%">
|
| 3 |
<tr>
|
| 4 |
<th><a href="<?php echo $log->url ?>"><?php _e ('Source URL', 'redirection'); ?>:</a></th>
|
| 5 |
+
<td><input style="width: 95%" type="text" name="something" readonly="readonly" value="<?php echo esc_attr (urldecode ($log->url)) ?>"/></td>
|
| 6 |
</tr>
|
| 7 |
<?php if ($log->sent_to) : ?>
|
| 8 |
<tr>
|
| 9 |
<th><a href="<?php echo $log->sent_to ?>"><?php _e ('Redirect to', 'redirection'); ?>:</a></th>
|
| 10 |
+
<td><input style="width: 95%" type="text" name="something" readonly="readonly" value="<?php echo esc_attr ($log->sent_to) ?>"/></td>
|
| 11 |
</tr>
|
| 12 |
<?php endif; ?>
|
| 13 |
<?php if ($redirect && isset($redirect->method) && $redirect->method) : ?>
|
| 14 |
<tr>
|
| 15 |
<th><?php _e ('Redirected by', 'redirection'); ?>:</th>
|
| 16 |
+
<td><?php echo $redirect->method->name () ?> <?php _e ('for', 'redirection'); ?>: <code><?php echo esc_html ($redirect->url) ?></code></td>
|
| 17 |
</tr>
|
| 18 |
<?php endif; ?>
|
| 19 |
<tr>
|
| 20 |
<th><?php _e ('User Agent', 'redirection'); ?>:</th>
|
| 21 |
+
<td><input style="width: 95%" type="text" readonly="readonly" name="other" value="<?php echo esc_html ($log->agent) ?>"/></td>
|
| 22 |
</tr>
|
| 23 |
<tr>
|
| 24 |
<td></td>
|
