Re: preventing direct component access

2012-04-10 Thread Cheong Hee (Gmail)
p...@vt.edu To: Amedeo Mantica amedeomant...@me.com Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 4:52 AM Subject: Re: preventing direct component access That code represents the per-app version of the conventional wisdom that I started out

Re: preventing direct component access

2012-04-10 Thread Patrick Robinson
: Cheong Hee (Gmail) chn...@gmail.com To: Patrick Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what

Re: preventing direct component access

2012-04-10 Thread Jon Nolan
Listwebobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal resolution to this? Bar the access of the page, or reduce the redundant sessions

Re: preventing direct component access

2012-04-10 Thread Amedeo Mantica
Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal resolution to this? Bar

Re: preventing direct component access

2012-04-10 Thread Pascal Robert
- From: Patrick Robinson p...@vt.edu To: Amedeo Mantica amedeomant...@me.com Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 4:52 AM Subject: Re: preventing direct component access That code represents the per-app version of the conventional wisdom

Re: preventing direct component access

2012-04-10 Thread Ramsey Gurley
Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal resolution to this? Bar the access

Re: preventing direct component access

2012-04-10 Thread Patrick Robinson
...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal resolution to this? Bar the access

Re: preventing direct component access

2012-04-10 Thread Patrick Robinson
webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal resolution to this? Bar the access of the page, or reduce the redundant

Re: preventing direct component access

2012-04-10 Thread Ramsey Gurley
- Original Message - From: Cheong Hee (Gmail) chn...@gmail.com To: Patrick Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting

Re: preventing direct component access

2012-04-10 Thread Amedeo Mantica
me if wrong.. Cheers Cheong Hee - Original Message - From: Cheong Hee (Gmail) chn...@gmail.com To: Patrick Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access

Re: preventing direct component access

2012-04-10 Thread Patrick Robinson
...@gmail.com To: Patrick Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick This is an interesting old issue. Just curious, what will be your ultimate ideal

Re: preventing direct component access

2012-04-10 Thread Ramsey Gurley
.. Cheers Cheong Hee - Original Message - From: Cheong Hee (Gmail) chn...@gmail.com To: Patrick Robinson p...@vt.edu Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 12:53 PM Subject: Re: preventing direct component access Hi Patrick

Re: preventing direct component access

2012-04-10 Thread Lachlan Deck
On 11/04/2012, at 3:31 AM, Amedeo Mantica wrote: I have patched WOComponentRequestHandler and created a pull request in the wonder/integration branch then you will set the property: ERXDirectComponentAccessAllowed=false You might want to add that property to the default project

Re: preventing direct component access

2012-04-09 Thread Patrick Robinson
Yeah, that _does_ sound rather annoying! :-P Is there a perhaps less-annoying way to approximate similar behavior? On Apr 5, 2012, at 2:46 PM, Mike Schrag wrote: I changed this in WO core, and unfortunately it's kind of annoying to fix without some hackery, but in

Re: preventing direct component access

2012-04-09 Thread Mike Schrag
probably just catch any time you have a .wo in your URL and throw ... you could do it in the url rewriter or something. i don't think there's ever any reason to have a .wo reference in a normal app. ms On Apr 9, 2012, at 10:00 AM, Patrick Robinson wrote: Yeah, that _does_ sound rather

Re: preventing direct component access

2012-04-09 Thread Patrick Robinson
But it doesn't even have to have the .wo on the end of the page name for this hack to work. If the app has a SecretPage.wo component, then a URL like this will instantiate and return it: https://myhost.mydomain/cgi-bin/WebObjects/MyApp.woa/wo/SecretPage//88.99 - Patrick On Apr 9, 2012,

Re: preventing direct component access

2012-04-09 Thread Mike Schrag
Yeah, you're right ... might be kind of a pain in the butt to fix without hackery then :) On Apr 9, 2012, at 3:41 PM, Patrick Robinson wrote: But it doesn't even have to have the .wo on the end of the page name for this hack to work. If the app has a SecretPage.wo component, then a URL

Re: preventing direct component access

2012-04-09 Thread Amedeo Mantica
Try this in your Application.java: public WOComponent pageWithName(String pageName, WOContext context) { if((context.senderID()==null)(componentRequestHandlerKey().equals(context.request().requestHandlerKey( {

Re: preventing direct component access

2012-04-09 Thread Patrick Robinson
That code represents the per-app version of the conventional wisdom that I started out questioning, below. The problem with this is that the user can specifiy a senderID (as in the URL I gave there), and then senderID() will *not* return null; in the case below, it'll be 99. On Apr 9, 2012,

Re: preventing direct component access

2012-04-09 Thread Amedeo Mantica
Yes, true I didn't noticed. Is very bad Amedeo On 09/apr/2012, at 22:52, Patrick Robinson wrote: That code represents the per-app version of the conventional wisdom that I started out questioning, below. The problem with this is that the user can specifiy a senderID (as in the URL I gave

Re: preventing direct component access

2012-04-09 Thread Ramsey Gurley
On Apr 5, 2012, at 11:39 AM, Patrick Robinson wrote: My point here is, there are more ways of hacking a WebObjects URL than I had previously considered. Does anyone have what they consider to be an ironclad solution to this problem? D2W ;-) Ramsey

Re: preventing direct component access

2012-04-09 Thread Cheong Hee (Gmail)
To: Amedeo Mantica amedeomant...@me.com Cc: WebObjects-Dev Mailing List webobjects-dev@lists.apple.com Sent: Tuesday, April 10, 2012 4:52 AM Subject: Re: preventing direct component access That code represents the per-app version of the conventional wisdom that I started out questioning, below

preventing direct component access

2012-04-05 Thread Patrick Robinson
I've stumbled across a wrinkle re: what I had assumed to be the conventional wisdom for preventing direct access to component pages via URLs like the following: http://myhost.mydomain/cgi-bin/WebObjects/MyApp.woa/-9876/wo/SecretPage.wo It's an old, old WO problem, and I'm wondering what

Re: preventing direct component access

2012-04-05 Thread Mike Schrag
I changed this in WO core, and unfortunately it's kind of annoying to fix without some hackery, but in WOComponentRequestHandler, there's a static method requestHandlerValuesForRequest ... That dictionary has a key named wopage in it. If you did some class rewriting (with like gluonj or