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 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
  3. 23 Jun, 2010 1 commit
  4. 22 Jun, 2010 1 commit
  5. 17 Mar, 2009 1 commit
  6. 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
  7. 20 Dec, 2006 1 commit
  8. 24 Feb, 2005 1 commit
  9. 10 Feb, 2005 1 commit
  10. 09 Feb, 2005 1 commit
    • Timothy Stack's avatar
      · ea206d40
      Timothy Stack authored
      Robot-related improvements based on feedback from Sid:
      
      	* event/sched/event-sched.h, event/sched/event-sched.c,
      	event/sched/rpc.h, event/sched/rpc.cc: Send a notification of the
      	start of event time and timelines.  Add a '-r' option that forces
      	it to use the default rpc path (so dan can use a custom
      	scheduler/rmcd/etc on ops).
      
      	* robots/GNUmakefile.in, robots/emc/GNUmakefile.in,
      	robots/mtp/GNUmakefile.in, robots/primotion/GNUmakefile.in,
      	robots/rmcd/GNUmakefile.in, robots/vmcd/GNUmakefile.in,
      	robots/tbsetdest/tbsetdest.cc: Add a control-install target.
      
      	* robots/primotion/garcia-pilot.cc: Take out some experimental
      	code.
      
      	* robots/primotion/dashboard.hh, robots/primotion/dashboard.cc,
      	robots/primotion/pilotClient.cc, robots/primotion/wheelManager.hh,
      	robots/primotion/wheelManager.cc: When doing a COMMAND_STOP, make
      	sure we only send one update packet, an idle or an abort.  Also
      	send back the actual distance travelled/pivoted.
      
      	* robots/tbsetdest/tbsetdest.cc: Don't output setdest event's with
      	a speed of zero.
      
      	* tbsetup/eventsys_control.in: When replaying/stopping, clear the
      	start of event time for the experiment.
      
      	* tbsetup/power_mail.pm.in: Decrease the threshold used to tell if
      	a node has been power cycled "recently".
      
      	* tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/sim.tcl.in: Bah, backout
      	last change, orientation is supposed to be in degrees at these
      	points.  Also, when automatically picking the sync server, don't
      	use nodes that are subnodes.
      
      	* tmcd/common/bootsubnodes: Send an ISUP for motes.
      
      	* www/moteleds.php3: Show the mote node names instead of the
      	robots.
      
      	* www/powertime.php3: Add option to mark nodes as powered off.
      
      	* www/robotmap.php3: Display the elapsed time for the overall
      	event time and for each active timeline.
      
      	* www/showexp.php3: Only display the blinky lights menu item when
      	there are motes.
      
      	* www/shownode.php3: Change "Update Power Time" -> "Update Power
      	State".
      
      	* www/tutorial/mobilewireless.php3: Fix some nits.
      
      	* xmlrpc/emulabserver.py.in: Add event_time_start method for
      	storing/getting/clearing the start of event time for an
      	experiment/timeline.
      ea206d40
  11. 24 Jan, 2005 1 commit
    • Timothy Stack's avatar
      · 3c1a5bad
      Timothy Stack authored
      Robot related stuff: power via e-mail, client-install fixups, checking
      coords against camera boundaries.
      
      	* configure, configure.in: Add tbsetup/power_mail.pm to the list
      	of template files.
      
      	* doc/cross-compiling.txt: More stargate notes.
      
      	* event/sched/rpc.cc: Updates for the addition of the cameras
      	table.
      
      	* robots/GNUmakefile.in, robots/emc/GNUmakefile.in,
      	robots/mtp/GNUmakefile.in, robots/rmcd/GNUmakefile.in,
      	robots/tbsetdest/GNUmakefile.in, robots/vmcd/GNUmakefile.in:
      	client-install fixups.
      
      	* tbsetup/GNUmakefile.in: Add power_mail.pm.
      
      	* tbsetup/os_setup.in: Don't skip reboot of robots anymore.
      
      	* tbsetup/power.in: Add special case for a power_id of "mail",
      	which calls into the power_mail.pm backend.
      
      	* tbsetup/power_mail.pm.in: E-mail backend for power, it sends an
      	e-mail to tbops and waits for the outlets.last_power value to be
      	updated from the power.php3 web page.
      
      	* tbsetup/ns2ir/parse-ns.in: Add the contents of the cameras table
      	to the TBCOMPAT namespace.
      
      	* tbsetup/ns2ir/sim.tcl.in: More checking of "setdest" inputs.
      
      	* tbsetup/ns2ir/topography.tcl: Update the checkdest method to
      	check destination points against the camera list.
      
      	* www/powertime.php3: Webpage used to update the last power time
      	for nodes.
      
      	* www/shownode.php3: Add "Update Power Time" menu button.
      3c1a5bad