AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 764194
Accepted
Eli
Eli
Asked: 2016-03-17 10:24:17 +0800 CST2016-03-17 10:24:17 +0800 CST 2016-03-17 10:24:17 +0800 CST

profttp 1.3.5b 在上传时在 wordpress 文件中注入额外的字符

  • 772

我一直试图找出为什么当我使用 ProFTPd 1.3.5b 上传全新的 wordpress 安装时,文件会被注入不属于文件的额外字符。

它只发生在/wp-includes/functions.php我所看到的

这些是我到目前为止打过的针

行~569:

foreach ( $pung as $link_test ) {
        if ( ! in_array( $link_test, $post_links_temp ) ) { // link no longer in post
            $mids = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $link_test ) . '%') );
t // <--- this "t" is added
            foreach ( $mids as $mid )
                delete_metadata_by_mid( 'post', $mid );
        }
    }

线~1780

function win_is_writable( $path ) {

    if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory
        return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
    } elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory
        return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
    }
    // check tmp file for read/write capabilities
    $should_delete_tmp_file = !file_exists( $path );
    $f = @fopen( $path, 'a' );
    if ( $f === false )
        return false;
    fclose( $f );
    if ( $should_delete_tmp_file )
        unlink( $path );
    return true;
}
e // <-- this "e" is added

线~2677

        .button:active {
            background: #eee;
            border-color: #999;
            -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
            box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
            -webkit-transform: translateY(1px);
            -ms-transform: translateY(1px);
            transform: translateY(1px);
        }
        o /* <-- this "o" is added */

        <?php
        if ( 'rtl' == $text_direction ) {
            echo 'body { font-family: Tahoma, Arial; }';
        }

线~3332

function wp_list_filter( $list, $args = array(), $operator = 'AND' ) {
    if ( ! is_array( $list ) )
        return array();

    if ( empty( $args ) )
        return $list;

    $operator = strtoupper( $operator );
    $count = count( $args );
    o // <-- this "o" is added
    $filtered = array();

    foreach ( $list as $key => $obj ) {
        $to_match = (array) $obj;

        $matched = 0;
        foreach ( $args as $m_key => $m_value ) {
            if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] )
                $matched++;
        }

        if ( ( 'AND' == $operator && $matched == $count )
            || ( 'OR' == $operator && $matched > 0 )
            || ( 'NOT' == $operator && 0 == $matched ) ) {
            $filtered[$key] = $obj;
        }
    }

    return $filtered;
}

线~3719

function _deprecated_argument( $function, $version, $message = null ) {
    i // <-- this "i" is added

    /**
     * Fires when a deprecated argument is called.
     *
     * @since 3.0.0
     *
     * @param string $function The function that was called.
     * @param string $message  A message regarding the change.
     * @param string $version  The version of WordPress that deprecated the argument used.
     */
    do_action( 'deprecated_argument_run', $function, $message, $version );

    /**
     * Filter whether to trigger an error for deprecated arguments.
     *
     * @since 3.0.0
     *
     * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
     */
    if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
        if ( function_exists( '__' ) ) {
            if ( ! is_null( $message ) )
                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) );
            else
                trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
        } else {
            if ( ! is_null( $message ) )
                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) );
            else
                trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) );
        }
    }
}

我通过端口 21 连接,常规 ftp(不是 sftp 或 tls)。也不使用被动模式。

proftpd
  • 1 1 个回答
  • 73 Views

1 个回答

  • Voted
  1. Best Answer
    Castaglia
    2016-07-27T09:16:13+08:002016-07-27T09:16:13+08:00

    对于遇到此行为的其他人,它是由ProFTPD Bug#4237引起的,并且已得到修复。

    希望这可以帮助!

    • 0

相关问题

  • 寻找一种干净的方法来关闭 ftp 服务器进行维护

  • 如何解决proftpd连接速度很慢?

  • 在 debian 上只有带有 proftpd 的 ftps

  • Proftpd 无法上传(550 错误)

  • 无法删除或编辑 ProFTPD 服务器上的文件

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve