Plugin Directory

Changeset 2308331


Ignore:
Timestamp:
05/20/2020 01:03:25 AM (6 years ago)
Author:
vaptcha
Message:

remove annotation

Location:
vaptcha/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vaptcha/trunk/VaptchaPlugin.php

    r2306831 r2308331  
    1616        register_activation_hook(plugin_dir_path( __FILE__ ). 'vaptcha.php', array($this, 'init_default_options'));
    1717        register_activation_hook(plugin_dir_path( __FILE__ ) . 'vaptcha.php', array($this, 'uninstall'));
    18         // register_activation_hook( dirname(__FILE__) . '/vaptcha.php', array($this, 'init_default_options'));
    19         // register_activation_hook( dirname(__FILE__) . '/vaptcha.php', array($this, 'uninstall'));
    2018        $this->init_add_actions();
    2119
     
    2422        $this->options = $options;
    2523    }
    26 
    27     // public function knock() {
    28     //     return $this->vaptcha->getknock($_REQUEST['scene']);
    29     // }
    3024
    3125    public function offline() {
     
    4236        $vid = get_option('vaptcha_options')['vaptcha_vid'];
    4337        $lang = get_option('vaptcha_options')['vaptcha_lang'];
    44         // $ai = get_option('vaptcha_options')['vaptcha_ai'];
    4538        $height = get_option('vaptcha_options')['vaptcha_height'];
    4639        $width = get_option('vaptcha_options')['vaptcha_width'];
     
    134127             $challenge =sanitize_text_field( $_POST['vaptcha_challenge'] );
    135128        }
    136         // $challenge = $_POST['vaptcha_challenge'];
    137129        $token = sanitize_text_field( $_POST['vaptcha_token'] );
    138130        if (!$token || !$this->vaptcha->validate($challenge, $token)) {
     
    176168             $challenge =sanitize_text_field( $_POST['vaptcha_challenge'] );
    177169        }
    178         // $challenge = $_POST['vaptcha_challenge'];
    179170        $token = sanitize_text_field( $_POST['vaptcha_token'] );
    180171        if (!$token || !$this->vaptcha->validate($challenge, $token)) {
     
    226217                'vaptcha_width' => '',
    227218                'vaptcha_height' => '',
    228                 // 'vaptcha_ai' => 'true',
    229219                'https' => 'false',
    230220                'button_style' => 'dark',
     
    242232
    243233    function load_textdomain() {
    244         // die(dirname( plugin_basename( __FILE__ ) ) . '/languages');
    245234        load_plugin_textdomain( 'vaptcha', false , dirname( plugin_basename( __FILE__ ) ) . '/languages' );       
    246235    }
  • vaptcha/trunk/lib/Vaptcha.class.php

    r2306831 r2308331  
    1818    public function __construct($vid, $key)
    1919    {
    20         // date_default_timezone_set("UTC");
    2120        $this->vid = $vid;
    2221        $this->key = $key;
     
    4039            $knock = self::readContentFormGet("$url?$query&signature=$signature");
    4140            if ($knock === $this->config['REQUEST_UESD_UP']) {
    42                 // $this->lastCheckdownTime = $now;
    43                 // $this->isDown = true;
    4441                self::$passedSignatures = array();
    4542                return $this->getDownTimeCaptcha();
     
    286283                if ($storageTIme && $storageTIme==$time) {
    287284                    return true;
    288                     // if (in_array($signature, self::$passedSignatures)) {
    289                     //     return false;
    290                     // } else {
    291                     //     array_push(self::$passedSignatures, $signature);
    292                     //     $length = count(self::$passedSignatures);
    293                     //     if ($length > MAX_LENGTH) {
    294                     //         array_splice(self::$passedSignatures, 0, $length - MAX_LENGTH + 1);
    295                     //     }
    296 
    297                     //     return true;
    298                     // }
    299285                } else {
    300286                    return false;
     
    310296        $md5 = md5($time . $this->key);
    311297        $captcha = substr($md5, 0, 3);
    312         // if (!self::$publicKey) {
    313         //     self::$publicKey = $this->getPublicKey();
    314         // }
    315298        $data = $this->getChannelData();
    316299        $knock = md5($captcha . $$time . $data['offline_key']);
    317300        $ul = $this->getImgUrl();
    318301        $url = md5($data['offline_key'] . $ul);
    319         // self::$imgid = $url;
    320302        $this->set($knock, $url);
    321         // Session::set($knock, $url);
    322303        return $callback===null?array(
    323304            "time" => $time,
  • vaptcha/trunk/lib/config.php

    r2303059 r2308331  
    66    'MAX_LENGTH' => 50000,
    77    'PIC_POST_FIX' => ".png",
    8     // 'PUBLIC_KEY_PATH' => "http://down.vaptcha.com/publickey",
    9     // 'IS_DOWN_PATH' => "http://down.vaptcha.com/isdown",
    10     // 'Channel_DownTime' => "https://channel.vaptcha.com/config/",
    118    'Channel_DownTime' => "http://channel2.vaptcha.com/config/",
    129    'DOWN_TIME_PATH' => "offline/",
     
    1512    'SDK_LANG' => 'php',
    1613    'API_URL' => 'http://0.vaptcha.com',
    17     // 'GET_CHALLENGE_URL' => '/challenge',
    1814    'GET_knock_URL' => '/knock',
    1915    'VALIDATE_URL' => '/verify',
Note: See TracChangeset for help on using the changeset viewer.