Plugin Directory

Changeset 1454072


Ignore:
Timestamp:
07/13/2016 12:53:55 PM (10 years ago)
Author:
ajaylulia
Message:

wSecure Lite Vurneribility bug fix

Location:
wsecure/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wsecure/trunk/includes.php

    r1454020 r1454072  
    77
    88//Checking for authenticate key value.
    9 
    10 function wse_up(){
    11 
    12 
    13 if ($_POST[opt]=="basic" && $_POST[Save]=="Save" )
    14     {
    15         /* Code to Save wSecure Config */
    16        
    17         include(dirname(__FILE__).'/params.php');
    18         $WSecureConfig = new WSecureConfig();
    19         $newkey = $_POST["key"]=="" ? $WSecureConfig->key : md5(base64_encode($_POST["key"])) ;
    20         $string = '<?php
    21         class WSecureConfig {
    22         var $publish = "'. $_POST["publish"]. '";
    23         var $passkeytype = "'. $_POST["passkeytype"] . '";
    24         var $key = "'. $newkey . '";
    25         var $options = "'. $_POST["options"]. '";
    26         var $custom_path = "'. $_POST["custom_path"]. '";
    27         }
    28         ?>';
    29         if (is_writable(dirname(__FILE__).'/params.php'))
    30         {
    31             $fp = fopen(dirname(__FILE__).'/params.php', "w+");
    32             fwrite($fp, $string);
    33             fclose($fp);
    34             wp_redirect(get_site_url()."/wp-admin/options-general.php?page=wsecure-configuration&w_action=save&opt=config");
    35            
    36         }
    37        
    38         /* Code to Save wSecure Config */
    39        
    40     }
    41 }
    42 
    439
    4410function ja_checkUrlKey()
     
    10470            {
    10571            unset($_SESSION['jSecureAuthentication']);
    106             //wp_redirect( $reditect_option );
    107             wp_redirect("http://$custom_path");
     72            wp_redirect( $reditect_option );
    10873            }
    10974            else
     
    11883            $home = get_bloginfo('home');
    11984            unset($_SESSION['jSecureAuthentication']);
    120             //wp_redirect( $reditect_option );
    121             wp_redirect("http://$custom_path");
     85            wp_redirect( $reditect_option );
    12286            endif;
    12387    }
     
    165129</div>
    166130<?php
    167     }
     131    }
     132
     133    function wse_up(){
     134   
     135       
     136    if($_POST[opt]=="basic" and $_POST[Save]=="Save" )
     137    {
     138        /* Code to SAve wSecure Config */
     139
     140    include(dirname(__FILE__).'/params.php');
     141    $WSecureConfig = new WSecureConfig();
     142        $newkey = $_POST["key"]=="" ? $WSecureConfig->key : md5(base64_encode($_POST["key"])) ;
     143        $string = '<?php
     144        class WSecureConfig {
     145        var $publish = "'. $_POST["publish"]. '";
     146        var $passkeytype = "'. $_POST["passkeytype"] . '";
     147        var $key = "'. $newkey . '";
     148        var $options = "'. $_POST["options"]. '";
     149        var $custom_path = "'. $_POST["custom_path"]. '";
     150        }
     151        ?>';
     152        if (is_writable(dirname(__FILE__).'/params.php'))
     153        {
     154            $fp = fopen(dirname(__FILE__).'/params.php', "w+");
     155            fwrite($fp, $string);
     156            fclose($fp);
     157            wp_redirect(get_site_url()."/wp-admin/options-general.php?page=wsecure-configuration&w_action=save&opt=config");
     158           
     159        }
     160
     161   
     162   
     163
     164/* // Code to SAve wSecure Config */
     165    }
     166   
     167    }
     168
     169   
    168170 ?>
  • wsecure/trunk/js/basic.js

    r1454020 r1454072  
    11function hideCustomPath(optionsValue){
    2 
    32    if(optionsValue.value == "1"){
    43        document.getElementById("custom_path").style.display = "";
  • wsecure/trunk/params.php

    r985162 r1454072  
    22        class WSecureConfig {
    33        var $publish = "1";
    4         var $passkeytype = "form";
     4        var $passkeytype = "url";
    55        var $key = "eb65e642486eb36f78a33e3783f18074";
    66        var $options = "0";
  • wsecure/trunk/wsecure-authentication.php

    r1454020 r1454072  
    1717add_action('wp_logout', 'ja_logout');
    1818add_action('init', 'ja_checkUrlKey');
     19add_action('admin_menu','wse_up');
    1920
    20 add_action('admin_menu','wse_up');
    2121function wsecure_menu()
    2222{
  • wsecure/trunk/wsecure-config.php

    r1454020 r1454072  
    99if(trim($_REQUEST['opt']) =='' )
    1010{
    11 
     11/*  echo "<pre>";
     12    print_r( $_REQUEST );
     13 */
    1214    $_REQUEST['opt'] = 'adv' ;
    1315    /* Redirect to Basic COnfiguration after Save */
     
    2022$opt = trim($_REQUEST['opt']);
    2123
     24
    2225$flag_saved = 0;
    2326
     
    8184  <div class="wsecure_container" >
    8285    <form name="save" id="save" method="post" action="options-general.php?page=wsecure-configuration" autocomplete="off">
    83         <input type="hidden" name="opt" value="basic"/>
     86    <input type="hidden" name="opt" value="basic"/>
    8487        <?php wp_nonce_field( $action ); ?>
    8588       
     
    149152
    150153          <input type="submit" name="Save" class="button-primary" value="Save" style="padding: 0px 18px;margin: 13px 0px;" />
    151                        
     154
    152155    </form>
    153     <script type="text/javascript">
     156   
     157    <script type="text/javascript">
    154158    hideCustomPath(document.getElementById('redirect_options'));
    155159    </script>
     
    289293        'url'       => 'http://www.joomlaserviceprovider.com/extensions/wordpress/commercial/wsecure-authentication.html',
    290294        'title'     => 'wSecure Authentication',
     295        /* translators: %1$s expands to Yoast SEO */
    291296        'desc'      => sprintf( __('Protect you Wordpress site! wSecure hides your Wordpress admin page from public access making it invisible helping protect your website from hackers.')),
    292297       
     
    300305           
    301306<?php
    302    
    303    
    304307   
    305308foreach($extensions as $extn){
Note: See TracChangeset for help on using the changeset viewer.