diff options
author | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 19:51:13 +0000 |
---|---|---|
committer | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 19:51:13 +0000 |
commit | ebf9f3932c75fc02864e446f10aa4d99ffbe1512 (patch) | |
tree | 93f9f41bcbe7beb0e69025045e8a40c4ead88120 /native_client_sdk/src/examples/httpd.py | |
parent | 2ad285cc76f93848cfec89f4028193793e8746e1 (diff) | |
download | chromium_src-ebf9f3932c75fc02864e446f10aa4d99ffbe1512.zip chromium_src-ebf9f3932c75fc02864e446f10aa4d99ffbe1512.tar.gz chromium_src-ebf9f3932c75fc02864e446f10aa4d99ffbe1512.tar.bz2 |
Convert examples from scons to Make
Remove all scons files.
Remove all scons test files.
Add Makefile.
Fix various build issues due to PPAPI changes.
NOTE: This only affect SDK builders and not Chrome itself.
BUG= http://code.google.com/p/chromium/issues/detail?id=109917
Review URL: http://codereview.chromium.org/9139029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src/examples/httpd.py')
-rwxr-xr-x | native_client_sdk/src/examples/httpd.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/native_client_sdk/src/examples/httpd.py b/native_client_sdk/src/examples/httpd.py index 76a4977..9865129 100755 --- a/native_client_sdk/src/examples/httpd.py +++ b/native_client_sdk/src/examples/httpd.py @@ -25,21 +25,21 @@ logging.getLogger().setLevel(logging.INFO) SERVER_PORT = 5103 SERVER_HOST = '' -# We only run from the examples or staging directory so -# that not too much is exposed via this HTTP server. Everything in the -# directory is served, so there should never be anything potentially sensitive -# in the serving directory, especially if the machine might be a -# multi-user machine and not all users are trusted. We only serve via -# the loopback interface. - -SAFE_DIR_COMPONENTS = ['staging', 'examples'] - +# We only run from the examples directory so that not too much is exposed +# via this HTTP server. Everything in the directory is served, so there should +# never be anything potentially sensitive in the serving directory, especially +# if the machine might be a multi-user machine and not all users are trusted. +# We only serve via the loopback interface. def SanityCheckDirectory(): - if os.path.basename(os.getcwd()) in SAFE_DIR_COMPONENTS: + httpd_path = os.path.abspath(os.path.dirname(__file__)) + serve_path = os.path.abspath(os.getcwd()) + + # Verify we are serving from the directory this script came from, or bellow + if serve_path[:len(httpd_path)] == httpd_path: return - logging.error('For security, httpd.py should only be run from one of the') - logging.error('following directories: %s' % SAFE_DIR_COMPONENTS) - logging.error('We are currently in %s', os.getcwd()) + logging.error('For security, httpd.py should only be run from within the') + logging.error('example directory tree.') + logging.error('We are currently in %s.' % serve_path) sys.exit(1) |