1. 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
  2. 11 Jul, 2012 1 commit
    • Leigh B Stoller's avatar
      Cleanup in the web interface to prevent XSS attacks. · 6cf701f9
      Leigh B 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
  3. 06 Mar, 2012 1 commit
  4. 17 Feb, 2012 1 commit
  5. 07 Nov, 2011 1 commit
  6. 08 Oct, 2011 1 commit
    • Mike Hibler's avatar
      Use boss as the ssh proxy if inner ops is a VM. · 992665d3
      Mike Hibler authored
      Subtle: if your elabinelab uses a VM for ops, then there will be no
      myops.eid.pid.emulab.net DNS alias created outside (since there is no actual
      ops node in the topo) and thus the inner ops cannot be used as a proxy for
      ssh'ing to the unroutable inner nodes. In that case we use the inner boss
      instead.
      992665d3
  7. 28 Jul, 2011 1 commit
  8. 02 Aug, 2010 1 commit
  9. 22 Jun, 2010 2 commits
  10. 28 Apr, 2010 1 commit
  11. 09 Feb, 2010 1 commit
  12. 03 Dec, 2009 1 commit
  13. 30 Nov, 2009 1 commit
  14. 08 May, 2009 1 commit
  15. 26 Feb, 2009 1 commit
  16. 23 Oct, 2008 1 commit
  17. 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
  18. 21 Aug, 2008 1 commit
    • David Johnson's avatar
      Add a new client side script, osconfig, that can update an MFS or a · dc10d326
      David Johnson authored
      frisbee-loaded slice based on a tarball downloaded from boss.  For now,
      the tarball is dynamically created by boss based on params sent to the
      osconfig_dump.php script; it is populated with files and a MANIFEST based
      on the files and constraints in the osconfig_* tables, which are pretty
      self-explanatory.  Transport is not secure, nor intended to be -- nodes on
      the control net or widearea nodes auth'd with a privkey can grab stuff
      destined to them based on their IP addr.  For the MFS case, the tarball is
      unpacked and the MANIFEST entries are executed/copied/extracted, and
      (nearly all of) the client side is re-run.  For the slicefix case, we just
      execute/copy/extract the MANIFEST entries in the mounted slice... there
      are some useful env vars set for scripts to use.
      
      If this mechanism ever becomes generally useful, or we're pushing big update
      tarballs, we'll have to add a caching mechanism (doh).  Right now, it's just
      for dongle-booted nodes or widearea nodes on which we cannot update the
      physical boot media without much pain; as well as for making major whacks
      to frisbee-loaded slices, which we need for the widearea case.
      
      Also, call this from rc.cdboot (to update a "read-only" (real media is
      mounted ro, but other parts of the fs are rw via unionfs or mfs) MFS),
      and from slicefix.
      
      NOTE: the client side osconfig script does not get installed from the
      makefile; this is intentional.  This script should not be placed in our
      local tftp'd MFSes, at least until there's some need for it!
      dc10d326
  19. 25 Jul, 2008 1 commit
  20. 18 Jul, 2008 1 commit
  21. 17 Jul, 2008 1 commit
  22. 15 Jul, 2008 1 commit
  23. 08 Jul, 2008 2 commits
  24. 11 Jun, 2008 1 commit
    • Kevin Atkinson's avatar
      · 425c4b89
      Kevin Atkinson authored
      Set the charset for all emulab pages to utf-8 which is needed to
      display foreign names correctly.  Also added three rows to table_regex:
      tinytext_utf8, text_utf8, fulltext_utf8
      
      Enhanced form_defs.php:
      
        - Add Support for Textarea
      
        - Add Support for a vertical list, for example see Category in
          submitpub.php
      
        - Add support for dumping the form values in plain text, used in the
          email I send to testbed-ops.
      
        - Change Error Reporting text for subfields such as in a list so
          they also include the text from the outer field, for example in
          newosid "ping" will become "OS Features, ping".  I needed this
          since some of my subfields didn't have labels and it seamed like
          the right thing to do.
      
        - Set #return_value to 1 in FormRenderCheckBox if it not already
          specified
      
        - In FormRenderSelect, if the #value is not in the list add it to
          the end.
      
        - Add support for "display" type, to just display some text in the
          table
      
        - Possibly some other little things I forgot about.
      
      New site variable PUBSUPPORT.
      
      Implement FS#201: Provide users a way to add a paper that used Emulab
      see (https://users.emulab.net/flyspray/?do=details&id=201), summary of
      changes:
      
        - Controlled via the new site variable PUBSUPPORT.
      
        - The emulab_papers spread sheet is now frozen all new changes
          should be made using the new system.
      
        - New pages submitpub.php for users to submit a new publication
          with different views for admins and non-admins.
      
        - New page expubs.php to replace doc/expubs.html, lists publications
          in database.  Also allows admins to edit publications.
      
        - Project members can edit papers associated with the project as
          long as they have local_root or higher privileges. Papers for a
          project are listed under a new tab in the showproject page. I keep
          track of the last person to edit the paper submission in addition
          to who initially submitted it.
      
        - Users can modify papers they submitted which is needed if the
          project was N/A. Papers users submitted now appear in a new tab in
          the showuser page.
      
        - Script to import spreadsheet to the database is in
          utah/bibliography/emulab_pubs-import.pl.
      
        - Changes web pages that point to doc/expubs.html to instead point
          to expubs.php
      425c4b89
  25. 09 May, 2008 1 commit
    • Kevin Atkinson's avatar
      Make project approval mail truly anonymous. Also make membership · 503bb661
      Kevin Atkinson authored
      acceptance email truly anonymous.  A few other emails related to
      project membership are still not anonymous though.  New function
      AnonSENDMAIL in libtestbed which will try to make sure there is no
      trace of the current user in the mail sent.
      
      For now, stop sending membership approval related email to the project
      admin list since this will also go to testbed-approval.  There is also
      some code to remove testbed-approval from the proj-admin list after
      the acceptance email but this is disabled for now since some times people
      reply to the approval email.
      503bb661
  26. 01 May, 2008 1 commit
    • Kevin Atkinson's avatar
      Implemt FS#187 -- Show admin history of projects: · 8054f5f8
      Kevin Atkinson authored
        When a project is initially created a new mailing list is created,
        PROJ-admin@emulab.net.
      
        testbed-approval is subscribed to the list
      
        Several emails that originally went to testbed-approval now go to the
        mailing list instead.  The From, To, fields are basically the same
        with testbed-approval becoming PROJ-admin.  This means some mail
        is sent with a From PROJ-admin and Bcc the mailing list.  Note that
        some mail still goes to testbed-approval directly, in particular
        ones where there is no clear project involved, and when a project is
        denied.
      
        In addition notifications of approval status of new members is also
        sent to the list.  These emails use to only go to testbed-audit@.
      
        Currently All mail sent to PROJ-admin is also sent to testbed-audit
        (via a Bcc).  This means that some mail that didn't use to go to
        testbed-audit now does.
      
        The mailing list is deleted when a project is deleted with out first
        being approved.  Becuase of this notified that a project is denied
        is sent to testbed-approval instead of PROJ-admin.
      
        Admins can access the mailing list from the Project Profile page.
      
        The mailing list is open in order to allow users to reply to the
        mailing list, in addition the check that PROJ-admin is in the To or
        CC field is disabled.  There is currently no spam control on the
        mailing lists.  However, since the mailing list address is not posted
        anywhere it should't pick up to much spam.  If it does we can deal
        with it then.
      
        Finally, a new script is created to create the per-project admin
        mailing list.  See doc/UPDATING.
      
      Also add DBQuerySingleFatal to libdb, which is like DBQueryFatal but
      also fails if the query didn't return any results.  Basically
      identical to he version in libtblog.  Eventually libtblog should be
      modified to use this version.
      8054f5f8
  27. 16 Apr, 2008 1 commit
  28. 24 Mar, 2008 1 commit
  29. 04 Feb, 2008 1 commit
  30. 07 Nov, 2007 1 commit
    • Leigh B. Stoller's avatar
      Just for kicks and cause I'm such a fan of "the wiki" I went ahead and · b15d5f78
      Leigh B. Stoller authored
      fully integrated Trac. I put a new installation in /usr/local/www/data/trac
      and I added all the hooks for adding users and doing the cross machine
      login. Only STUDLY() users will actually see the new option in the collab
      dropdown menu.
      
      I have not done anything to make the trac installation look like Emulab.
      b15d5f78
  31. 31 Oct, 2007 1 commit
    • Leigh B. Stoller's avatar
      Convert the usage box at the top from an iframe to an inline table so that · b3210aa7
      Leigh B. Stoller authored
      it can be actively clicked and toggled between the short status view and
      the long freenode view. There was no way to do this when it was an iframe,
      and the upside of not using an iframe is that iframes often mess up rendering
      and cause many cross-browser problems.
      
      Since its not an iframe, I have to hook into the Sajax stuff even on
      pages that already use Sajax, and I want to go to a different URL then
      the current page (want to use currentusage.php3). So I tweaked the Sajax
      stuff a bit, and roll out some inline sajax code in PAGEFOOTER().
      
      Also, at Rob's request I added a cookie to remember the state of the
      user's choice so that subsequent page loads get the same view. This
      is done with an inline cookie in the javascript (document.cookies).
      b3210aa7
  32. 23 Apr, 2007 1 commit
  33. 17 Apr, 2007 1 commit
  34. 07 Mar, 2007 2 commits
  35. 14 Feb, 2007 1 commit
  36. 12 Feb, 2007 2 commits
    • Robert Ricci's avatar
      New front page text, for the first time in a few years. More clearly · b3e8a3e5
      Robert Ricci authored
      enumerates the different experimental environments we support. Most
      of the new text only gets displayed at Utah, since no one else has
      wireless nodes, etc. Other sites get some short generic text.
      
      New banner, plus other visual tweaks. The new banner is turned on via
      the new @FANCYBANNER@ autoconf variable. This is turned on for
      TBMAINSITE, but defaults to off for other sites. This is so that
      existing sites which already have their own versions of the old banner
      don't have to update them right away.
      
      Made the usage iframe a little less prominent, by darkening it, and
      making it ever so slightly transparent on browsers that support it.
      
      Some minor visual tweaks to the background and content area.
      
      Added specific IDs for the main menu subgroups so that if we want, we
      can style them differently.
      
      Man, IE is a pain in the ass.
      b3e8a3e5
    • 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