1. 01 May, 2009 1 commit
    • Mike Hibler's avatar
      Whoa...it's a coding frenzy for mike! · 53c8aa91
      Mike Hibler authored
      Be more explicit in the final message about deleting a user when you are
      just removing that user from a project and not entirely.
      
      Just about pissed my pants when it told me it was deleting a user after
      I had confirmed that I REALLY (and REALLY, REALLY) just wanted to delete
      them from a project.
      53c8aa91
  2. 21 Oct, 2008 1 commit
    • Kevin Atkinson's avatar
      If a known user (based on stored cookies) is not logged in than · 846a98d6
      Kevin Atkinson authored
      redirect to the login page rather than printing a message with a link
      to the page.  Otherwise send a "403 Forbidden" to keep robots from
      indexing the page.  Also send appreciate HTTP responses on other
      precheck errors to keep a robot from indexing the page.  In order to
      do this the PAGEHEADER call needed to be moved to after
      CheckLoginOrDie and Required/OptionalPageArguments on many pages.  A
      warning will be printed if either CheckLoginOrDie or
      Required/OptionalPageArguments detects that PAGEHEADER was already
      called.
      
      Also change the redirect in kb-show to be a permanent redirect (301)
      rather than a temporary one (302) which is the default unless a status
      code is given.
      846a98d6
  3. 16 Feb, 2007 1 commit
  4. 12 Feb, 2007 1 commit
    • Leigh B. Stoller's avatar
      * Replace the argument processing code in all pages. Currently we rely on · 48acc8e3
      Leigh B. 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
  5. 25 Jan, 2007 1 commit
  6. 09 Jan, 2007 1 commit
  7. 20 Dec, 2006 1 commit
  8. 15 Jun, 2006 1 commit
  9. 06 Jun, 2006 1 commit
    • Leigh B. Stoller's avatar
      A set of cosmetic changes. Actually one consmetic changes in a lot of · ecab2742
      Leigh B. Stoller authored
      places. I refactored the "busy" logo stuff that is done in various
      scripts in various formats into a couple of functions. I have not
      changed all the code that does the busy thing, but I got a bunch this
      time around. In menu.php I added a couple of functions (that spit out
      little bits of javascript).
      
      	STARTBUSY($msg)
      
      	Display a centered message (ie: "Starting Swapout"), then a
      	plead to be patient, and then the "busy" icon (spinning thing
      	that my Mac does too).
      
      
      	STOPBUSY();
      
      	Clear the busy icon, and replace "Working ..." with "Done"
      
      
      	CLEARBUSY();
      
      	Clear the busy icon and delete "Working ..."
      
      
      	PAGEREPLACE($url)
      
      	Delay one second and then replace the current page with the
      	new page.
      ecab2742
  10. 01 Jul, 2003 1 commit
  11. 28 Mar, 2003 1 commit
  12. 13 Feb, 2003 1 commit
  13. 24 Jan, 2003 1 commit
    • Leigh B. Stoller's avatar
      Major reorg of deleteuser page. Dump the old rmacct-ctrl (finally!) · 250f9c20
      Leigh B. Stoller authored
      and replace with script to delete a user, either from a single project
      or from the entire testbed. All of the DB stuff is done in the script;
      the web interface no longer does anything but error checks. This is
      because removing a user requires some finess in when things are
      removed, and if there are any failures I wanted to make sure that the
      script could be rerun on a user, without barfing.
      
      Add lots of error checks to make sure not deleting a user who is
      "important" (project head, group head, experiment head, etc).
      
      Add "request" mode. If a project leader deletes a user from his
      project, and the user has no more project memberships, show a click
      button to send us email requesting the user be deleted from the
      testbed.
      
      Bottom line, project leaders can now delete users from their project,
      but must ask us to delete the account from the testbed.
      250f9c20
  14. 06 Dec, 2002 1 commit
    • Leigh B. Stoller's avatar
      Reorg the deleteuser stuff. In the perl script, watch for non-existent · 437b8ebf
      Leigh B. Stoller authored
      accounts and do not die. Also, no longer rename the home dir; just
      leave it where it is; not sure that served any purpose at all.
      Also mark nodes as needing account updates (this requires that the
      group_membership remain intact until after the script runs).
      
      In the php script, also purge the sfskeys table and the new
      widearea_accounts table.
      437b8ebf
  15. 10 Jul, 2002 1 commit
  16. 07 Jul, 2002 1 commit
  17. 12 Jun, 2002 1 commit
    • Leigh B. Stoller's avatar
      The big key changes ... Deprecate the two pubkey slots in the users · 6c6f8baf
      Leigh B. Stoller authored
      table and create a new table to hold user_pubkeys, indexed by the
      comment field of the key. Change mkacct to insert newly created Emulab
      keys into that table, and to regen the users authorized_keys file
      from the DB. Users should no longer edit their own authorized_keys
      file or the changes will be lost (I put a comment in their files).
      
      Change the three pages that deal with keys. join/new project can now
      take a file of multiple keys; each is inserted. Moved the key stuff
      that was in the update user info page into a new pubkeys page that
      allows users to add/sub keys easily. New key additions are password
      protected.
      
      Unrelated change: Add an audit mode to mkacct to log its output and
      send it to the tblogs email. Previously, warnings and errors tended to
      get lost.
      6c6f8baf
  18. 12 Feb, 2002 1 commit
  19. 16 Oct, 2001 1 commit
  20. 10 May, 2001 1 commit
    • Leigh B. Stoller's avatar
      Lots of little changes for sending email to the right places, with · 3285bc3e
      Leigh B. Stoller authored
      proper headers. Split out some of the mail into testbed-logs,
      testbed-ops, and testbed-approval. Added a library for including from
      our perl scripts. Contains a couple of mail helper functions, but will
      hopefully contain more as time goes by.
      
      Fixed a bug in the web interface that was causing breakage for people
      with multiple accounts. Mac and Jay have noticed this, when logging
      out and trying to join or create a project under a new or different
      name.
      3285bc3e
  21. 03 Jan, 2001 1 commit
  22. 21 Dec, 2000 1 commit