Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Portcullis and the setupRequest() method
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Seb Duggan  
View profile  
 More options Feb 24 2011, 5:43 am
From: Seb Duggan <seb.dug...@gmail.com>
Date: Thu, 24 Feb 2011 10:43:47 +0000
Local: Thurs, Feb 24 2011 5:43 am
Subject: Portcullis and the setupRequest() method
I'm trying to implement Portcullis as a defence against scripting
attacks, etc.

I started by running it on the URL and FORM scopes at the start of the
setupRequest() method, but this had no effect - I realised because the
request.context has already been populated from the URL and FORM scopes.

My question is this: at the start of the requestSetup method, are the
only values in request.context the values populated by the URL and FORM
scopes? If I run:

var Portcullis = getBeanFactory().getBean('Portcullis');
Portcullis.scan(request.context, 'request.context', cgi.remote_addr);

...I want to be sure it's not going to have any effect on any other
values in request.context.

Or should I use onRequestStart() to run the scans on URL and FORM before
they're populated into request.context?

Seb


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Seb Duggan  
View profile   Translate to Translated (View Original)
 More options Feb 25 2011, 9:03 am
From: Seb Duggan <seb.dug...@gmail.com>
Date: Fri, 25 Feb 2011 06:03:07 -0800 (PST)
Local: Fri, Feb 25 2011 9:03 am
Subject: Re: Portcullis and the setupRequest() method
OK, I've worked it out, and wrote a blog post about it:

http://sebduggan.com/posts/integrating-portcullis-into-fw1-applications

Hope this is useful to anyone else planning on using Portcullis...

Seb

On Feb 24, 10:43 am, Seb Duggan <seb.dug...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Dintenfass  
View profile   Translate to Translated (View Original)
 More options Feb 25 2011, 2:05 pm
From: Nathan Dintenfass <nat...@dintenfass.com>
Date: Fri, 25 Feb 2011 11:05:39 -0800
Local: Fri, Feb 25 2011 2:05 pm
Subject: Re: [framework-one] Re: Portcullis and the setupRequest() method
Just curious: why didn't scanning request.context work?  In your
setupRequest you shouldn't be stepping over any of the RC vars you're
populating in your controllers, so that seems like a great time to check
everything in one place without needing to the gymnastics you're going
through.  That would also let you load Portcullis in your beanFactory
(or as a local variable in your setupApplication) and use it as a
service instead of having separate application variables running around
(which would also open up more flexibility to use its other methods in
your controllers).

On 2/25/11 6:03 AM, Seb Duggan wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Seb Duggan  
View profile  
 More options Feb 25 2011, 2:17 pm
From: Seb Duggan <seb.dug...@gmail.com>
Date: Fri, 25 Feb 2011 19:17:02 +0000
Local: Fri, Feb 25 2011 2:17 pm
Subject: Re: [framework-one] Re: Portcullis and the setupRequest() method

Hi Nathan,

That's what I did originally - but in practice it didn't work.

On pages where a redirect has occurred - passing rc values through to
the target page - these values are also in the request.context at the
start of setupRequest(). And if these values are not simple values (for
instance, passing a struct or an object), then Portcullis throws an error.

I got around this by looping through request.context, creating a new
struct with all the simple values in it, running this through
Portcullis, then appending the cleaned struct back into request.context
- but in the end this seemed like a lot of hoops to jump through, and
added unnecessary processing (although probably not too much of a
performance hit).

I think Portcullis could use a little development to allow all the scans
to be done in one go - and so just return the single isDetected() value,
which would remove some of the "gymnastics". When I've got some time, I
might work on that...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "view() and setView() use slashes instead of dots, why?" by Nathan Dintenfass
Nathan Dintenfass  
View profile  
 More options Feb 28 2011, 6:59 pm
From: Nathan Dintenfass <nat...@dintenfass.com>
Date: Mon, 28 Feb 2011 15:59:29 -0800
Local: Mon, Feb 28 2011 6:59 pm
Subject: view() and setView() use slashes instead of dots, why?
I'm working on that presentation about FW/1 (which I'll share) --
brought up a question that has always bugged me:

Why in view() and setView() do we have to use a "/" instead of a "." --
seems to make it unparallel with all other places we refer to an action.

Thanks ;)

  - Nathan D


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dutch Rapley  
View profile  
 More options Feb 28 2011, 8:08 pm
From: Dutch Rapley <dutch.rap...@gmail.com>
Date: Mon, 28 Feb 2011 20:08:03 -0500
Local: Mon, Feb 28 2011 8:08 pm
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?

When you reference services, you're not referencing the specific file, but
an instance of the service object and a method to perform some action - dot
notation is appropriate. The sames goes for actions, the dot notation
references an instance of a controller and an "item" method that needs to be
executed.

When working with views, the framework doing a file lookup starting from
your application's "view" folder. The slash is natural for file paths. If we
specified dot notation for views, we would have to use a regex and replace
all instances of a dot with a slash - which would be a little less efficient
than using the slash as we currently do. You don't have to specify the .cfm
file extension as it's implied and added by the framework.

-Dutch

On Mon, Feb 28, 2011 at 6:59 PM, Nathan Dintenfass <nat...@dintenfass.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Dintenfass  
View profile  
 More options Feb 28 2011, 8:18 pm
From: Nathan Dintenfass <nat...@dintenfass.com>
Date: Mon, 28 Feb 2011 17:18:53 -0800
Local: Mon, Feb 28 2011 8:18 pm
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?
Sounds like an implementation concern bubbling up to an interface ;)

Thanks for the explanation.

  - Nathan

On 2/28/11 5:08 PM, Dutch Rapley wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Cogswell  
View profile  
 More options Mar 1 2011, 10:10 am
From: Ryan Cogswell <ryancogsw...@gmail.com>
Date: Tue, 1 Mar 2011 09:10:06 -0600
Local: Tues, Mar 1 2011 10:10 am
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?

The reason is because you are NOT specifying an action.  The "view" method
is much more flexible than what we allow for actions since it allows you to
organize sub-views with as deep of a directory structure as you want
underneath the views directory.  The syntax of an action has a very specific
meaning ("section.item") and is parsed in a manner that does not allow for
the possibility of finding views further down in the directory structure.  I
think the reasoning for different syntax in the "view" method has more to do
with not confusing people into thinking it has the same limitations as
actions and not wanting to confuse people into thinking that actions allow
additional dots to go deeper into the directory structure.

Why in view() and setView() do we have to use a "/" instead of a "."
   -- seems to make it unparallel with all other places we refer to an
   action.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Dintenfass  
View profile  
 More options Mar 1 2011, 12:11 pm
From: Nathan Dintenfass <nat...@dintenfass.com>
Date: Tue, 1 Mar 2011 09:11:19 -0800
Local: Tues, Mar 1 2011 12:11 pm
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?

Ok, sold!  ;)

Thanks,
 - Nathan

On Mar 1, 2011, at 7:10 AM, Ryan Cogswell <ryancogsw...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sean Corfield  
View profile  
 More options Mar 1 2011, 12:41 pm
From: Sean Corfield <seancorfi...@gmail.com>
Date: Tue, 1 Mar 2011 09:41:31 -0800
Local: Tues, Mar 1 2011 12:41 pm
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?
What Ryan said :)

--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dutch Rapley  
View profile  
 More options Mar 1 2011, 1:12 pm
From: Dutch Rapley <dutch.rap...@gmail.com>
Date: Tue, 1 Mar 2011 13:12:16 -0500
Local: Tues, Mar 1 2011 1:12 pm
Subject: Re: [framework-one] view() and setView() use slashes instead of dots, why?

That's what I was trying to say, but you said it better!

-Dtuch

On Tue, Mar 1, 2011 at 10:10 AM, Ryan Cogswell <ryancogsw...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »