1. 16 May, 2007 1 commit
  2. 12 Feb, 2007 1 commit
    • Leigh Stoller's avatar
      * Replace the argument processing code in all pages. Currently we rely on · 48acc8e3
      Leigh Stoller authored
        register_globals=1 to turn POST/GET/COOKIES arguments in local variables.
        This is known to be a terrible security risk, and we keep saying we are
        going to fix it, and now I am. In order to accomplish this on a
        transitional basis (since I don't want the entire web interface to stop
        working while I debug it), and because the code just needs the cleanup, I
        am doing it like this: Each page will sport new declarations at the top:
      
      	RequiredPageArguments("experiment", PAGEARG_EXPERIMENT,
                                    "template",   PAGEARG_TEMPLATE,
                                    "instance",   PAGEARG_INSTANCE,
                                    "metadata",   PAGEARG_METADATA,
                                    "osinfo",     PAGEARG_OSINFO,
                                    "image",      PAGEARG_IMAGE,
                                    "project",    PAGEARG_PROJECT,
                                    "group",      PAGEARG_GROUP,
                                    "user",       PAGEARG_USER,
      			      "node",       PAGEARG_NODE,
      			      "yesno",      PAGEARG_BOOLEAN,
      			      "message",    PAGEARG_STRING,
      			      "age",        PAGEARG_INTEGER,
                                    "cost",       PAGEARG_NUMERIC,
                                    "formfields", PAGEARG_ARRAY,
                                    "unknown",    PAGEARG_ANYTHING);
      
      	OptionalPageArguments("canceled", PAGEARG_BOOLEAN);
      
        The first token in each pair is the name of the global variable to
        set, and the second token is the type. So, for "experiment" we look at
        the URL for a pid/eid or exptidx, etc, sanity check them (safe for a
        DB query), and then try to find that experiment in the DB. If it maps
        to an experiment, set global variable $experiment to the object. Since
        its a required argument, produce an error if not supplied. Similar
        treatment for optional arguments, with the obvious difference.
      
        The goal is to have ALL argument processing in one place, consistent,
        and correct. I've found numerous places where we leak unchecked
        arguments into queries. It also cuts out a lot of duplicated code.
      
      * To make the above easier to deal with, I've been replacing lots of
        hardcoded URLS in the code of the form:
      
      	foo.php3?pid=$pid&eid=$eid ...
      
        with
      
              CreateURL("foo", $experiment)
      
        which creates and returns the neccessary url string, by looking at
        the type of its arguments (experiment, template, instance, etc.)
      
        Eventually plan to replace them all so that URL handling throughout
        the code is all defined in one place (all the new URL code is in
        url_defs.php).
      
      * I have cranked up error reporting to tell me anytime a variable is
        used before it is initialized, plus a bunch of other stuff that PHP
        deems improper. Think of it like -Wall ... and boy we get a lot of
        warnings.  A very large percentage of the diffs are to fix all these
        warnings.
      
        The warnings are currently going to /usr/testbed/log/php-errors.log,
        and I'll be adding a script to capture them each night and mail them
        to tbops. This file also gets errors (this will be a change for
        developers; rather then seeing errors and warnings dumped in the
        middle of web pages, they will go to this file instead).
      
      * Major refactoring of the code. More objects (nodes, images, osids).
        Moving tons of queries into the objects in the hopes of someday
        getting to a point where we can split the web interface onto a
        different server.  Lots of general cleanup.
      48acc8e3
  3. 19 Jan, 2007 1 commit
    • Leigh Stoller's avatar
      Just for Jay: · 5947dfce
      Leigh Stoller authored
      * On the showuser_list page, use red font to indicate projects for
        which the user is not yet approved.
      
      * On the showuser page, show all project membership and highlight in
        red those that are not yet approved.
      5947dfce
  4. 09 Jan, 2007 1 commit
  5. 21 Dec, 2006 1 commit
  6. 20 Dec, 2006 1 commit
  7. 27 Jun, 2006 1 commit
  8. 15 Jun, 2006 1 commit
  9. 19 Dec, 2005 1 commit
    • Leigh Stoller's avatar
      Add support for moving deleted users to a deleted users table. This · b4231fbf
      Leigh Stoller authored
      would be no big deal, except that we want to retain user_stats for
      deleted users, and rather then a deleted_user_stats table, I want to
      retain stats for deleted users in the user_stats table, since that
      is a more natural place for them.
      
      The main problem is that we use the login (uid) as the cross table
      reference slot all over the DB, which is fundamentally incorrect, if
      we want to be able reuse uids and still know what historical data
      refers to.
      
      So, I have taken a few baby steps towards weaning us off the uid, and
      towards permanently unique key for users, using the unix_uid integer
      for now, but probably something slightly different later.
      
      The user_stats is now indexed on this new key (called uid_idx in the
      users_stats table) instead of the plain uid.
      
      The unix_uid slot in the users table is no longer an auto_increment
      field, but instead uses the emulab_indicies table for the next
      available index.
      b4231fbf
  10. 03 Nov, 2004 1 commit
  11. 30 Sep, 2003 1 commit
  12. 23 Jul, 2003 1 commit
  13. 01 May, 2003 1 commit
  14. 10 Feb, 2003 1 commit
  15. 24 Jan, 2003 2 commits
  16. 06 Dec, 2002 1 commit
  17. 16 Aug, 2002 1 commit
    • Chad Barb's avatar
      · 60529980
      Chad Barb authored
      The big one.
      
      New look;
      most of the changes are in menu.php3.
      
      A lot of the changes in other files are s/<TD>/<TH>/
      for table headers.
      
      Also closed some tags, tweaked some table styles, etc..
      
      No actual functionality should have changed.
      
      Will be installing soon...
      60529980
  18. 13 Jul, 2002 1 commit
  19. 07 Jul, 2002 1 commit
  20. 24 Jun, 2002 1 commit
  21. 05 Jun, 2002 1 commit
  22. 02 Jun, 2002 1 commit
  23. 15 Apr, 2002 1 commit
  24. 10 Apr, 2002 1 commit
  25. 08 Feb, 2002 1 commit
  26. 27 Nov, 2001 1 commit
  27. 29 Oct, 2001 1 commit
    • Leigh Stoller's avatar
      A bunch of lastlogin changes! The user and experiment information · 4658545e
      Leigh Stoller authored
      pages now show the lastlogin info that is gathered from sshd syslog
      reporting to users. That info is parsed by security/genlastlog.c, and
      entered into the DB in the nodeuidlastlogin and uidnodelastlogin
      tables. If not obvious from the names, for each user we want the last time
      they logged in anyplace, and for each node we want the last time anyone
      logged into it. The latter is obviously more useful for scheduling
      purposes. All of the various images have new /etc/syslog.conf files,
      and the 6.2 got new sshd_configs (all cvsup'ed with kill -HUP). There
      is an entry in boss:/etc/crontab and users:/etc/syslog.conf. All of
      this is decribed in greater detail in security/genlastlog.c.
      4658545e
  28. 17 Oct, 2001 1 commit
  29. 16 Oct, 2001 1 commit
  30. 01 Oct, 2001 1 commit
  31. 18 Apr, 2001 1 commit
  32. 16 Mar, 2001 1 commit
  33. 25 Jan, 2001 1 commit
  34. 21 Dec, 2000 1 commit