Plugin Directory

Changeset 2384440


Ignore:
Timestamp:
09/18/2020 12:46:06 PM (5 years ago)
Author:
onwebchat_dev
Message:

security bug fix

Location:
onwebchat
Files:
2 edited
4 copied

Legend:

Unmodified
Added
Removed
  • onwebchat/tags/3.2.0/onwebchat.php

    r2336842 r2384440  
    55Description: onWebChat is a live chat system, that helps you communicate with your website's visitors.
    66Author: onWebChat
    7 Version: 3.1.0
     7Version: 3.2.0
    88Author URI: https://www.onwebchat.com
    99*/
     
    7171     *****************************************************************/
    7272    if ( isset( $_POST["action"] ) && $_POST["action"] == "login" ) {
     73
     74
     75        // the following lines are added to verify a correct security nonce(token) by using "wp_verify_nonce()"
     76        if (! isset($_POST['_wpnonce'])
     77         || ! wp_verify_nonce( $_POST['_wpnonce'], 'on_web_chat_nonce')){
     78            print 'Sorry, your nonce did not verify.';
     79            exit;
     80         }
    7381
    7482        $options = get_option('onwebchat_plugin_option');
     
    226234            <?php
    227235
     236            //create nonce(token)
     237            wp_nonce_field('on_web_chat_nonce');
     238
    228239            // Login Page
    229240            if($isConnected != true) {
     
    274285                // display user email
    275286                if($options!=''){
     287                    //sanitize user-provided parameter
     288                    $email = esc_html($options);
    276289                    $html = '<br><h3 class="header-1-p2">Activated for onWebChat account: </h3>';
    277                     $html .= "<strong class='account-id'>$options</strong> ";
     290                    $html .= "<strong class='account-id'>$email</strong> ";
    278291                }
    279292
     
    314327
    315328                <div id="onwc_show_on_pages_div" style="display:none">
    316                     <input id="showonpages" name="showonpages" class="showhidepages" type="text" value="<?php echo get_option( 'onwebchat_plugin_option_show_pages' ); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
     329                    <input id="showonpages" name="showonpages" class="showhidepages" type="text" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_show_pages' )); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
    317330                </div>
    318331                <div id="onwc_hide_on_pages_div" style="display:none">
    319                     <input id="hideonpages" name="hideonpages" class="showhidepages" type="text" value="<?php echo get_option( 'onwebchat_plugin_option_hide_pages' ); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
     332                    <input id="hideonpages" name="hideonpages" class="showhidepages" type="text" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_hide_pages' )); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
    320333                </div>
    321334
     
    328341                    <strong>onWebChat API:</strong>
    329342                    <br>
    330                     <textarea class="chatid-text-field" style="margin-left: 0px;" rows="10" name="onwebchat-api"><?php echo $onwebchatApi; ?></textarea>
     343                    <!-- sanitize user-provided parameter  -->
     344                    <textarea class="chatid-text-field" style="margin-left: 0px;" rows="10" name="onwebchat-api"><?php echo esc_html($onwebchatApi); ?></textarea>
    331345                    <br>
    332346                    <br>
     
    338352
    339353                <!-- hiden fields -->
    340                 <input class="chatid-text-field-hide" type="text" name="chatId" value="<?php echo $chatId; ?>"/>
    341                 <input class="chatid-text-field-hide" type="text" name="onWebChatUser" value="<?php echo get_option( 'onwebchat_plugin_option_user' ); ?>"/>
     354                <input class="chatid-text-field-hide" type="text" name="chatId" value="<?php echo esc_attr($chatId); ?>"/>
     355                <input class="chatid-text-field-hide" type="text" name="onWebChatUser" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_user' )); ?>"/>
    342356                <input class="chatid-text-field-hide" type="text" name="isSecondPage" value="1"/>
    343357
  • onwebchat/tags/3.2.0/readme.txt

    r2364589 r2384440  
    1919
    2020Don't twice and start now! It takes less than a minute, to get started, just install onWebChat live chat plugin and [sign up for our service on www.onwebchat.com](https://www.onwebchat.com/signup.php "onWebChat sign up page")
     21
     22[youtube https://www.youtube.com/embed/YihmL6BpEvc?rel=0]
    2123
    2224
     
    124126== Changelog ==
    125127
     128= onWebChat Live Chat (Chat version 3.2.0) =
     129* Security bug fix
     130
    126131= onWebChat Live Chat (Chat version 3.1.0) =
    127132* Javascript api commands support
  • onwebchat/trunk/onwebchat.php

    r2336842 r2384440  
    55Description: onWebChat is a live chat system, that helps you communicate with your website's visitors.
    66Author: onWebChat
    7 Version: 3.1.0
     7Version: 3.2.0
    88Author URI: https://www.onwebchat.com
    99*/
     
    7171     *****************************************************************/
    7272    if ( isset( $_POST["action"] ) && $_POST["action"] == "login" ) {
     73
     74
     75        // the following lines are added to verify a correct security nonce(token) by using "wp_verify_nonce()"
     76        if (! isset($_POST['_wpnonce'])
     77         || ! wp_verify_nonce( $_POST['_wpnonce'], 'on_web_chat_nonce')){
     78            print 'Sorry, your nonce did not verify.';
     79            exit;
     80         }
    7381
    7482        $options = get_option('onwebchat_plugin_option');
     
    226234            <?php
    227235
     236            //create nonce(token)
     237            wp_nonce_field('on_web_chat_nonce');
     238
    228239            // Login Page
    229240            if($isConnected != true) {
     
    274285                // display user email
    275286                if($options!=''){
     287                    //sanitize user-provided parameter
     288                    $email = esc_html($options);
    276289                    $html = '<br><h3 class="header-1-p2">Activated for onWebChat account: </h3>';
    277                     $html .= "<strong class='account-id'>$options</strong> ";
     290                    $html .= "<strong class='account-id'>$email</strong> ";
    278291                }
    279292
     
    314327
    315328                <div id="onwc_show_on_pages_div" style="display:none">
    316                     <input id="showonpages" name="showonpages" class="showhidepages" type="text" value="<?php echo get_option( 'onwebchat_plugin_option_show_pages' ); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
     329                    <input id="showonpages" name="showonpages" class="showhidepages" type="text" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_show_pages' )); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
    317330                </div>
    318331                <div id="onwc_hide_on_pages_div" style="display:none">
    319                     <input id="hideonpages" name="hideonpages" class="showhidepages" type="text" value="<?php echo get_option( 'onwebchat_plugin_option_hide_pages' ); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
     332                    <input id="hideonpages" name="hideonpages" class="showhidepages" type="text" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_hide_pages' )); ?>" /><a href="#" style="text-decoration: none;" onmouseover="document.getElementById('help').style.visibility = 'visible'"; ONMOUSEOUT="document.getElementById('help').style.visibility = 'hidden'"><strong><font size="4" face="Arial"> ? </font></strong></a>
    320333                </div>
    321334
     
    328341                    <strong>onWebChat API:</strong>
    329342                    <br>
    330                     <textarea class="chatid-text-field" style="margin-left: 0px;" rows="10" name="onwebchat-api"><?php echo $onwebchatApi; ?></textarea>
     343                    <!-- sanitize user-provided parameter  -->
     344                    <textarea class="chatid-text-field" style="margin-left: 0px;" rows="10" name="onwebchat-api"><?php echo esc_html($onwebchatApi); ?></textarea>
    331345                    <br>
    332346                    <br>
     
    338352
    339353                <!-- hiden fields -->
    340                 <input class="chatid-text-field-hide" type="text" name="chatId" value="<?php echo $chatId; ?>"/>
    341                 <input class="chatid-text-field-hide" type="text" name="onWebChatUser" value="<?php echo get_option( 'onwebchat_plugin_option_user' ); ?>"/>
     354                <input class="chatid-text-field-hide" type="text" name="chatId" value="<?php echo esc_attr($chatId); ?>"/>
     355                <input class="chatid-text-field-hide" type="text" name="onWebChatUser" value="<?php echo esc_attr(get_option( 'onwebchat_plugin_option_user' )); ?>"/>
    342356                <input class="chatid-text-field-hide" type="text" name="isSecondPage" value="1"/>
    343357
  • onwebchat/trunk/readme.txt

    r2364589 r2384440  
    1919
    2020Don't twice and start now! It takes less than a minute, to get started, just install onWebChat live chat plugin and [sign up for our service on www.onwebchat.com](https://www.onwebchat.com/signup.php "onWebChat sign up page")
     21
     22[youtube https://www.youtube.com/embed/YihmL6BpEvc?rel=0]
    2123
    2224
     
    124126== Changelog ==
    125127
     128= onWebChat Live Chat (Chat version 3.2.0) =
     129* Security bug fix
     130
    126131= onWebChat Live Chat (Chat version 3.1.0) =
    127132* Javascript api commands support
Note: See TracChangeset for help on using the changeset viewer.