Options:
Previous day, Next day
- # Session Start: Wed Dec 31 00:00:00 2014
- # Session Ident: #testing
- # [00:48] * heycam|away is now known as heycam
- # [01:07] <bhill2> hmm....
- # [01:07] <bhill2> if someone wants to check in a utility file that is a python script
- # [01:07] <bhill2> what's the preferred method of doing so?
- # [01:08] <bhill2> I expect we would prefer it not be just a .py file under the webroot, as that will get treated as an executable content handler by wptserve, yes?
- # [01:08] <bhill2> (this utility is specific to one set of test cases, not generic for WPT)
- # [01:33] <MikeSmith> bhill2: I think the thing to do is just check it in
- # [01:34] <MikeSmith> bhill2: if it's in the tree anywhere, I think there's no way to prevent wptserve for treating it as an executable content handler. But that's not a problem
- # [01:34] <bhill2> should we at least change the extension to other than .py so it won't match the python handler regex?
- # [01:35] <MikeSmith> you could but it's not necessary
- # [01:36] <MikeSmith> we have other python scripts in the tree that aren't meant to be run from the web
- # [01:37] <MikeSmith> stuff in the tools/scripts directory for one
- # [01:37] <MikeSmith> but in various other places as well
- # [01:38] <MikeSmith> https://github.com/w3c/web-platform-tests/tree/master/tools/scripts -- the manifest.py script and update_html5lib_tests.py and lint.py
- # [01:39] <MikeSmith> stuff in https://github.com/w3c/web-platform-tests/tree/master/2dcontext/tools for generating test cases
- # [01:41] <bhill2> ok. gives the me the security willies
- # [01:49] <jgraham> Well any python file is theoretically a security problem if it's unverified
- # [01:50] <jgraham> If you write your helper file with nothing at the top level and no main() function (or one that won't accept to arguments), it won't be executed by the web handler
- # [01:51] <jgraham> But things under /tools/ are actually a special case
- # [01:52] <jgraham> So if you are really concerned you can put files there
- # [01:52] <bhill2> but a utility script will have a main()
- # [01:52] <bhill2> since they're generally intended to be run from the command line
- # [01:54] <jgraham> main() isn't special in python
- # [01:54] <jgraham> (but it is in the server)
- # [01:54] <jgraham> you can do:
- # [01:54] <jgraham> if __name__ == "__main__":
- # [01:55] <jgraham> some_name_that_isnt_main()
- # [01:55] <jgraham> Which I'm pretty sure won't get execuated in the server context (although I suppose I should check)
- # [01:58] <jgraham> Yeah, it won
- # [01:58] <jgraham> 't
- # [02:00] <bhill2> ok, thanks
- # [02:13] <MikeSmith> I guess if we wanted to we could implement support in wptserve for a blacklist of .py scripts in the tree that it won't evaluate
- # [02:15] <bhill2> if ( inPath('tools') ) ...
- # [02:20] <MikeSmith> I think there's already something like that in the wptserve code actually
- # [02:20] <MikeSmith> not exactly for this case, but it already understands the tools dir is to be handled differently
- # [02:21] <MikeSmith> ah in serve.py actually
- # [02:22] <MikeSmith> ... (any_method, "/tools/*", handlers.ErrorHandler(404))
- # [02:23] <MikeSmith> bhill2: so it seems like it's safe security-wise to just drop them in the tools dir, as jgraham suggested
- # [02:25] <MikeSmith> I guess we should document this
- # [02:26] <MikeSmith> Will write a PR
- # [02:32] <bhill2> nice
- # [02:33] <bhill2> but would be better if
- # [02:33] <bhill2> ... (any_method, "*/tools/*", handlers.ErrorHandler(404))
- # [02:33] <bhill2> so you can put utilities close to the files they affect
- # [02:34] <MikeSmith> yeah that'd probably be ok
- # [02:37] * heycam is now known as heycam|away
- # [02:40] <bhill2> nope: ValueError: Star seen after star in regexp
- # [02:56] * Joins: bhill2_ (~bhill2@public.cloak)
- # [03:03] * Quits: bhill2 (~bhill2@public.cloak) (Ping timeout: 180 seconds)
- # [03:03] * Quits: bhill2_ (~bhill2@public.cloak) (Ping timeout: 180 seconds)
- # [03:20] * heycam|away is now known as heycam
- # [06:13] * heycam is now known as heycam|away
- # [09:22] * Joins: Ms2ger (~Ms2ger@public.cloak)
- # [12:13] * Joins: ptressel (~chatzilla@public.cloak)
- # [12:26] * Quits: ptressel (~chatzilla@public.cloak) ("zzz")
- # [14:09] * Quits: terri (~terri@public.cloak) (Ping timeout: 180 seconds)
- # [14:12] * Joins: terri_offline (~terri@public.cloak)
- # [14:12] * terri_offline is now known as terri
- # [14:52] * Joins: plh (plehegar@public.cloak)
- # [14:58] <Ms2ger> plh, hey, going to do GSOC this year?
- # [15:01] <plh> hi
- # [15:01] <plh> well, I'm out of budget for traveling :(
- # [15:02] <Ms2ger> Didn't know it involved any
- # [15:02] <plh> well, unless this is near Boston, that would need some
- # [15:07] <MikeSmith> plh: I think Ms2ger just means does W3C have any plans for sponsoring a student project for GSOC, like we did a couple years ago
- # [15:07] <MikeSmith> Ms2ger: you have some specific ideas?
- # [15:07] <Ms2ger> Not yet
- # [15:08] <plh> oh
- # [15:08] <Ms2ger> But we had a list one year that we didn't end up participating, IIRC
- # [15:08] <plh> sorry
- # [15:08] <plh> that would be a great idea indeed
- # [15:09] <plh> deadline for applications is February 20
- # [16:02] <MikeSmith> 明けましておめでとうございます friends
- # [16:02] <MikeSmith> Happy New Year
- # [16:08] <Ms2ger> And to you!
- # [16:30] * Joins: scott_gonzalez (~scott_gonzalez@public.cloak)
- # [17:07] <jgraham> MikeSmith: Happy new year!
- # [17:07] <jgraham> plh: Yeah, let's sort out GSoC more proactively this year :)
- # [17:27] * Quits: Ms2ger (~Ms2ger@public.cloak) ("Happy New Year!")
- # [17:43] * Joins: bhill2 (~bhill2@public.cloak)
- # [17:43] * Quits: bhill2 (~bhill2@public.cloak) (Client closed connection)
- # [17:43] * Joins: bhill2 (~bhill2@public.cloak)
- # [17:52] * Joins: gitbot (~gitbot@public.cloak)
- # [17:52] -gitbot:#testing- [web-platform-tests] hillbrad closed pull request #1481: SRI allows base64 and unhyphenated digest names (master...update_sri_tests) https://github.com/w3c/web-platform-tests/pull/1481
- # [17:52] * Parts: gitbot (~gitbot@public.cloak) (gitbot)
- # [18:50] * Joins: bhill2_ (~bhill2@public.cloak)
- # [18:56] * Quits: bhill2 (~bhill2@public.cloak) (Ping timeout: 180 seconds)
- # [18:57] * Quits: bhill2_ (~bhill2@public.cloak) (Ping timeout: 180 seconds)
- # [20:47] * Joins: AutomatedTester (~AutomatedTester@public.cloak)
- # [22:41] * Joins: bhill2 (~bhill2@public.cloak)
- # [22:42] * Quits: plh (plehegar@public.cloak) ("Leaving")
- # [23:03] * Quits: bhill2 (~bhill2@public.cloak) (Client closed connection)
- # [23:06] * Quits: AutomatedTester (~AutomatedTester@public.cloak) (Client closed connection)
- # [23:07] * Joins: bhill2 (~bhill2@public.cloak)
- # Session Close: Thu Jan 01 00:00:00 2015
Previous day, Next day
Think these logs are useful? Then please donate to show your gratitude (and keep them up, of course). Thanks! — Krijn