Plugin Directory

Changeset 2780267


Ignore:
Timestamp:
09/05/2022 04:29:02 PM (4 years ago)
Author:
Alphawolf
Message:

Version 1.1.2 update:

  • Fixed Admin+ Stored XSS vulnerability
Location:
goolytics-simple-google-analytics/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • goolytics-simple-google-analytics/trunk/goolytics.php

    r2579676 r2780267  
    22/*
    33Plugin Name: Goolytics - Simple Google Analytics
    4 Version: 1.1.1
     4Version: 1.1.2
    55Plugin URI: https://wordpress.org/plugins/goolytics-simple-google-analytics/
    66Description: A simple Google Analytics solution that works without slowing down your WordPress installation.
     
    1010Domain Path: /languages
    1111
    12 Copyright 2013-2021 Oliver Schlöbe (email : scripts@schloebe.de)
     12Copyright 2013-2022 Oliver Schlöbe (email : scripts@schloebe.de)
    1313
    1414This program is free software; you can redistribute it and/or modify
     
    122122        if ( !function_exists("add_action") ) return;
    123123       
    124         register_setting(self::_NAMESPACE, 'goolytics_web_property_id');
     124        register_setting(self::_NAMESPACE, 'goolytics_web_property_id', array(
     125            'type' => 'string',
     126            'sanitize_callback' => array(&$this, 'sanitize_web_property_id')
     127        ));
    125128        register_setting(self::_NAMESPACE, 'goolytics_anonymize_ip');
    126129        register_setting(self::_NAMESPACE, 'goolytics_usercentrics_support');
     
    244247    }
    245248   
     249   
     250    /**
     251    * Sanitize web_property_id input
     252    *
     253    * @since        1.1.2
     254    * @author       scripts@schloebe.de
     255    */
     256    function sanitize_web_property_id( $input ) {
     257        if( preg_match('/^[A-Z][A-Z0-9]?-[A-Z0-9]{4,10}(?:\-[1-9]\d{0,3})?$/', $input) ) {
     258            return $input;
     259        } else {
     260            if( empty($input) ) {
     261                add_settings_error(
     262                    'goolytics_web_property_id',
     263                    'goolytics_web_property_id',
     264                    __('The Google Analytics ID is empty.', 'goolytics-simple-google-analytics'),
     265                    'error'
     266                );
     267            } else {
     268                add_settings_error(
     269                    'goolytics_web_property_id',
     270                    'goolytics_web_property_id',
     271                    __('The Google Analytics ID you entered is invalid. Please check your input and try again.', 'goolytics-simple-google-analytics'),
     272                    'error'
     273                );
     274            }
     275            return '';
     276        }
     277    }
     278   
    246279}
    247280
  • goolytics-simple-google-analytics/trunk/languages/goolytics-simple-google-analytics-de_DE.po

    r2185546 r2780267  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2019-11-04 11:21+0000\n"
    6 "PO-Revision-Date: 2019-11-04 12:42+0000\n"
     6"PO-Revision-Date: 2022-09-02 19:16+0000\n"
    77"Last-Translator: Alphawolf <scripts@schloebe.de>\n"
    8 "Language-Team: Deutsch\n"
     8"Language-Team: German\n"
    99"Language: de_DE\n"
    1010"Plural-Forms: nplurals=2; plural=n != 1;\n"
     
    9494msgstr "Goolytics - Simple Google Analytics"
    9595
    96 #: goolytics.php:243
     96#: goolytics.php:246
    9797msgid "Goolytics - Simple Google Analytics requires at least WordPress 3.0!"
    9898msgstr "Goolytics - Simple Google Analytics benötigt mindestens WordPress 3.0!"
     
    126126msgstr "Oliver Schl&ouml;be"
    127127
    128 #: goolytics.php:215 inc/options.php:11
     128#: goolytics.php:218 inc/options.php:11
    129129msgid "Settings"
    130130msgstr "Einstellungen"
     
    142142"werden sollen, indem das letzte Oktett der IP-Adresse entfernt wird."
    143143
    144 #: goolytics.php:230
     144#: goolytics.php:233
    145145#, php-format
    146146msgid ""
     
    153153"werden. Danach ist alles bereit."
    154154
     155#: goolytics.php:264
     156msgid "The Google Analytics ID is empty."
     157msgstr "Die Google Analytics ID ist leer."
     158
     159#: goolytics.php:271
     160msgid ""
     161"The Google Analytics ID you entered is invalid. Please check your input and "
     162"try again."
     163msgstr ""
     164"Die von Ihnen eingegebene Google Analytics-ID ist ungültig. Bitte überprüfen "
     165"Sie Ihre Eingabe und versuchen Sie es erneut."
     166
    155167#: inc/options.php:23 inc/options.php:38
    156168msgid "Yes"
  • goolytics-simple-google-analytics/trunk/languages/goolytics-simple-google-analytics.pot

    r2185546 r2780267  
    44"Project-Id-Version: Goolytics - Simple Google Analytics\n"
    55"Report-Msgid-Bugs-To: \n"
    6 "POT-Creation-Date: 2019-11-04 11:21+0000\n"
     6"POT-Creation-Date: 2022-09-02 19:15+0000\n"
    77"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    88"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    8181msgstr ""
    8282
    83 #: goolytics.php:243
     83#: goolytics.php:246
    8484msgid "Goolytics - Simple Google Analytics requires at least WordPress 3.0!"
    8585msgstr ""
     
    111111msgstr ""
    112112
    113 #: goolytics.php:215 inc/options.php:11
     113#: goolytics.php:218 inc/options.php:11
    114114msgid "Settings"
    115115msgstr ""
     
    125125msgstr ""
    126126
    127 #: goolytics.php:230
     127#: goolytics.php:233
    128128#, php-format
    129129msgid ""
     
    131131"<a href=\"%s\">settings page</a>, finish setting up the plugin and you are "
    132132"good to go!"
     133msgstr ""
     134
     135#: goolytics.php:264
     136msgid "The Google Analytics ID is empty."
     137msgstr ""
     138
     139#: goolytics.php:271
     140msgid ""
     141"The Google Analytics ID you entered is invalid. Please check your input and "
     142"try again."
    133143msgstr ""
    134144
  • goolytics-simple-google-analytics/trunk/readme.txt

    r2730943 r2780267  
    4646== Changelog ==
    4747
     48= 1.1.2 =
     49* Fixed Admin+ Stored XSS vulnerability
     50
    4851= 1.1.1 =
    4952* Localization preparations for translate.wordpress.org
Note: See TracChangeset for help on using the changeset viewer.