Giter Club home page Giter Club logo

pure-ftpd-webui's People

Contributors

mazay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pure-ftpd-webui's Issues

Monitor active connections - wrong implementation?

Greetings!

index.php, which resembles the "users activity monitor" page uses "sudo /etc/init.d/pure-ftpd-mysql status" shell_exec to get array of uesrs. It's not only bad idea to use sudo, but this also returns only status of service, not an active connections list. Is it me or this is underwritten?

            $result = shell_exec("sudo $pureftpd_init_script_path status");
            $array = explode("\n", $result);
            foreach ($array as $users) {
            if (($users != "") and (substr($users, 0, 3) != "+--") and (substr($users, 2, 3) != "PID")) {
            list ($tmp, $pid, $user, $speed, $stat, $file) = explode("|", $users);

            echo("          <tr>
                                            <td class='center'>$user</td>
                                            <td class='center'>$speed</td>
                                            <td class='center'>$stat</td>
                                            <td>$file</td>
                                    </tr>");}}

pure-ftpd default uses crypt

in the current (2013/12) version of debian wheezy, pure-ftpd uses the "users" as the default table for the selecting the credentials. Also default it awaits a crypt encoded password and not md5.

Its worth mentioning in your README.

thx for your effort in writing this.
Thomas

mysql

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

Few findings

Hi,

I found some coding problems from pure-ftpd-webuis code.

  • Don't use russian as comment language, for rest of us it's impossible to understand comments, if they are not written in english.
  • Don't use shorthand PHP-tags. Your code won't work on all platforms if eg. "<?", use just "<?php".
  • Also, don't ever use variables directly inside translations! Use tokens that are replaced before printing. Using variables causes a punch of "Notice: Undefined index" warnings and you can't change values after translation is included (otherwise than including it again)!
  • And do "isset($variable)" checks for all $_POST / etc., eg. in edit-user.php line 73 should be "isset($_POST['add_user'])" not just "$_POST['add_user']".
  • And as last not, use "$_SERVER['PHP_SELF']" instead of "$PHPSELF".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.