1. 13 Dec, 2017 1 commit
    • Leigh Stoller's avatar
      This started out as a simple change ... · 1d526637
      Leigh Stoller authored
      I noticed that group_root could not delete users from projects. Seems
      like we should allow that, but with the restriction that a group_root
      cannot delete another group_root. Simple enough, right? Well thats not
      how the permission system works; permission to do stuff to users is
      based on who you are in the project, not who you are doing it to.
      
      And then there are the subtle differences in permission handling between
      the Classic interface and the Portal interface. And I am fully
      unmotivated to fix anything in the Classic interface, hard to believe?
      
      Anyway, most people are not going to notice anything since the bulk of
      the changes affect sub groups. Sigh.
      1d526637
  2. 16 May, 2017 1 commit
  3. 24 Sep, 2012 1 commit
    • Eric Eide's avatar
      Replace license symbols with {{{ }}}-enclosed license blocks. · 6df609a9
      Eric Eide authored
      This commit is intended to makes the license status of Emulab and
      ProtoGENI source files more clear.  It replaces license symbols like
      "EMULAB-COPYRIGHT" and "GENIPUBLIC-COPYRIGHT" with {{{ }}}-delimited
      blocks that contain actual license statements.
      
      This change was driven by the fact that today, most people acquire and
      track Emulab and ProtoGENI sources via git.
      
      Before the Emulab source code was kept in git, the Flux Research Group
      at the University of Utah would roll distributions by making tar
      files.  As part of that process, the Flux Group would replace the
      license symbols in the source files with actual license statements.
      
      When the Flux Group moved to git, people outside of the group started
      to see the source files with the "unexpanded" symbols.  This meant
      that people acquired source files without actual license statements in
      them.  All the relevant files had Utah *copyright* statements in them,
      but without the expanded *license* statements, the licensing status of
      the source files was unclear.
      
      This commit is intended to clear up that confusion.
      
      Most Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the Affero GNU General Public License, version 3
      (AGPLv3).
      
      Most Utah-copyrighted files related to ProtoGENI are distributed under
      the terms of the GENI Public License, which is a BSD-like open-source
      license.
      
      Some Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the GNU Lesser General Public License, version 2.1
      (LGPL).
      6df609a9
  4. 30 Jul, 2012 1 commit
  5. 11 Jul, 2012 1 commit
    • Leigh Stoller's avatar
      Cleanup in the web interface to prevent XSS attacks. · 6cf701f9
      Leigh Stoller authored
      We had a couple of different problems actually.
      
      * We allow users to insert html into many DB fields (say, a project or
        experiment description).
      
      * We did not sanitize that output when displaying back.
      
      * We did not sanitize initial page arguments that were reflected in the
        output (say, in a form).
      
      Since no one has the time to analyze every line of code, I took a couple of
      shortcuts. The first is that I changed the regex table to not allow any <>
      chars to go from the user into the DB. Brutal, but in fact there are only a
      couple of places where a user legitimately needs them. For example, a
      startup command that includes redirection. I handle those as special
      cases. As more come up, we can fix them.
      
      I did a quick pass through all of the forms, and made sure that we run
      htmlspecialchars on everything including initial form args. This was not
      too bad cause of the way all of the forms are structured, with a
      "formfields" array.
      
      I also removed a bunch of obsolete code and added an update script to
      actually remove them from the www directory.
      
      Lastly, I purged some XMLRPC code I did a long time ago in the Begin
      Experiment path. Less complexity, easier to grok and fix.
      
      	modified:   sql/database-fill.sql
      	modified:   sql/dbfill-update.sql
      6cf701f9
  6. 22 Mar, 2010 1 commit
    • Leigh Stoller's avatar
      Finish up user deletion. The big visible change is that when a user is · 2965922b
      Leigh Stoller authored
      deleted, they still remain in the user table with a status of
      "archived", but since all the queries in the system now use uid_idx
      instead of uid, it is safe to reuse a uid since they are no longer
      ambiguous. 
      
      The reason for not deleting users from the users table is so that the
      stats records can refer to the original record (who was that person
      named "mike"). This is very handy and worth the additional effort it
      has taken.
      
      There is no way to ressurect a user, but it would not be hard to add.
      2965922b
  7. 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
  8. 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
  9. 16 Feb, 2007 1 commit
  10. 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
  11. 25 Jan, 2007 1 commit
  12. 09 Jan, 2007 1 commit
  13. 20 Dec, 2006 1 commit
  14. 15 Jun, 2006 1 commit
  15. 06 Jun, 2006 1 commit
    • Leigh Stoller's avatar
      A set of cosmetic changes. Actually one consmetic changes in a lot of · ecab2742
      Leigh 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
  16. 01 Jul, 2003 1 commit
  17. 28 Mar, 2003 1 commit
  18. 13 Feb, 2003 1 commit
  19. 24 Jan, 2003 1 commit
    • Leigh Stoller's avatar
      Major reorg of deleteuser page. Dump the old rmacct-ctrl (finally!) · 250f9c20
      Leigh 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
  20. 06 Dec, 2002 1 commit
    • Leigh Stoller's avatar
      Reorg the deleteuser stuff. In the perl script, watch for non-existent · 437b8ebf
      Leigh 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
  21. 10 Jul, 2002 1 commit
  22. 07 Jul, 2002 1 commit
  23. 12 Jun, 2002 1 commit
    • Leigh Stoller's avatar
      The big key changes ... Deprecate the two pubkey slots in the users · 6c6f8baf
      Leigh 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
  24. 12 Feb, 2002 1 commit
  25. 16 Oct, 2001 1 commit
  26. 10 May, 2001 1 commit
    • Leigh Stoller's avatar
      Lots of little changes for sending email to the right places, with · 3285bc3e
      Leigh 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
  27. 03 Jan, 2001 1 commit
  28. 21 Dec, 2000 1 commit