Plugin Directory

Changeset 3220301


Ignore:
Timestamp:
01/10/2025 03:16:07 PM (15 months ago)
Author:
skyword
Message:

Revision 2.5.3, first phase of security and Plugin Check changes

Location:
skyword-plugin/tags/2.5.3
Files:
1 deleted
1 edited
5 copied

Legend:

Unmodified
Added
Removed
  • skyword-plugin/tags/2.5.3/php/class-skyword-publish.php

    r3078733 r3220301  
    354354            $post    = get_post( $post_id, ARRAY_A );
    355355            if ( empty( $post['ID'] ) ) {
    356                 return new IXR_Error( 404, __( 'Invalid post ID.' ) );
     356                return new IXR_Error( 404, __( 'Invalid post ID.', 'skyword-plugin' ) );
    357357            }
    358358
     
    360360
    361361            if ( ! $result ) {
    362                 return new IXR_Error( 500, __( 'The post cannot be deleted.' ) );
     362                return new IXR_Error( 500, __( 'The post cannot be deleted.', 'skyword-plugin' ) );
    363363            }
    364364
     
    451451
    452452                $taxonomy['values'] = explode( ',', $taxonomy['values'] );
    453    
     453
    454454                if ( $this->valuesIsNumeric( $taxonomy['values'] ) ) {
    455455                    if ( 'post' === $postType ) {
     
    568568                $upload = wp_upload_bits( $name, null, $bits );
    569569                if ( ! empty( $upload['error'] ) ) {
    570                     $errorString = sprintf( __( 'Could not write file %1$s (%2$s)' ), $name, $upload['error'] );
     570                    $errorString = __( 'Could not write file ', 'skyword-plugin') . $name . '(' . $upload['error']. ')';
    571571                    return new IXR_Error( 500, $errorString );
    572572                }
     
    618618                $upload = wp_upload_bits( $name, null, $bits );
    619619                if ( ! empty( $upload['error'] ) ) {
    620                     $errorString = sprintf( __( 'Could not write file %1$s (%2$s)' ), $name, $upload['error'] );
     620                    $errorString = __( 'Could not write file', 'skyword-plugin') . $name . ' (' . $upload['error'] . ')';
    621621                    return new IXR_Error( 500, $errorString );
    622622                }
     
    741741        if ( 'skywordapikey' !== $username ) {
    742742            if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) ) {
    743                 $response['message'] = new IXR_Error( 403, __( 'Invalid UN/PW Combination: UN = ' . $username . ' PW = ' . $password ) );
     743                $response['message'] = new IXR_Error( 403, __( 'Invalid UN/PW Combination: UN = ', 'skyword-plugin') . $username . __(' PW = ', 'skyword-plugin') . $password );
    744744                $response['status']  = 'error';
    745745            } else if ( ! user_can( $user->ID, 'edit_posts' ) ) {
    746                 $response['message'] = new IXR_Error( 403, __( 'You do not have sufficient privileges to login.' ) );
     746                $response['message'] = new IXR_Error( 403, __( 'You do not have sufficient privileges to login.', 'skyword-plugin' ) );
    747747                $response['status']  = 'error';
    748748            } else {
     
    775775                    $response['status'] = 'success';
    776776                } else {
    777                     $response['message'] = new IXR_Error( 403, __( 'Could not match hash.' ) );
     777                    $response['message'] = new IXR_Error( 403, __( 'Could not match hash.' , 'skyword-plugin') );
    778778                    $response['status']  = 'error';
    779779                }
    780780            } else {
    781                 $response['message'] = new IXR_Error( 403, __( 'Skyword API key not set.' ) );
     781                $response['message'] = new IXR_Error( 403, __( 'Skyword API key not set.' , 'skyword-plugin') );
    782782                $response['status']  = 'error';
    783783            }
    784784        } else {
    785             $response['message'] = new IXR_Error( 403, __( 'Bad timestamp used. ' . $hash . ' Timestamp sent: ' . $timestamp ) );
     785            $response['message'] = new IXR_Error( 403, __( 'Bad timestamp used. ', 'skyword-plugin') . $hash . __(' Timestamp sent: ', 'skyword-plugin') . $timestamp );
    786786            $response['status']  = 'error';
    787787        }
     
    865865                }
    866866                else
    867                     return new IXR_Error( 500, __( 'User cannot be created, ensure new user creation is enabled in both Skyword and WordPress or use the Co-Authors Plus plugin.' ) );
     867                    return new IXR_Error( 500, __( 'User cannot be created, ensure new user creation is enabled in both Skyword and WordPress or use the Co-Authors Plus plugin.', 'skyword-plugin' ) );
    868868            }
    869869
  • skyword-plugin/tags/2.5.3/php/class-skyword-shortcode.php

    r2020690 r3220301  
    8888            }
    8989            if (in_array($k, $validattrs, true) && isset($v)) {
    90                 $iframeattrs .= " " . $k . "=\"" . $v . "\"";
     90                $iframeattrs .= " " . sanitize_text_field($k) . "=\"" . sanitize_text_field($v) . "\"";
    9191            }
    9292        }
  • skyword-plugin/tags/2.5.3/php/options.php

    r3078733 r3220301  
    3838            <p class="submit">
    3939                <input name="Submit" type="submit" class="button-primary"
    40                        value="<?php esc_attr_e( 'Save Changes' ); ?>"/>
     40                       value="<?php esc_attr_e( 'Save Changes', 'skyword-plugin' ); ?>"/>
    4141            </p>
    4242        </form>
  • skyword-plugin/tags/2.5.3/readme.txt

    r3078733 r3220301  
    44Requires at least: 3.3
    55Tested up to: 6.5.2
    6 Stable tag: 2.5.2
     6Stable tag: 2.5.3
    77
    88Allows integration with the skyword publishing platform.
     
    2020
    2121== Changelog ==
     22
     23= 2.5.3 =
     24* Update iframe shortcode to sanitize user input
     25* Other changes suggested by Plugin Check
    2226
    2327= 2.5.2 =
  • skyword-plugin/tags/2.5.3/skyword.php

    r3078733 r3220301  
    1515    define( 'SKYWORD_PATH', plugin_dir_path( __FILE__ ) );
    1616if ( !defined('SKYWORD_VERSION') )
    17     define( 'SKYWORD_VERSION', "2.5.2" );
     17    define( 'SKYWORD_VERSION', "2.5.3" );
    1818if ( !defined('SKYWORD_VN') )
    19     define( 'SKYWORD_VN', "2.52" ); //This CANNOT have two decimal places.
     19    define( 'SKYWORD_VN', "2.53" ); //This CANNOT have two decimal places.
    2020//.1.4 is NOT valid.
    2121
Note: See TracChangeset for help on using the changeset viewer.