Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Question about url and form paramaters

Explorer ,
Nov 11, 2009 Nov 11, 2009

I was just doing some testing on our coldfusion 8 server and it seems like the URL and FORM structures are universaly availible

everywhere, inside a CF function they are passed by reference.

Is there a way to disable this functionality? I have a cffunction that i don't want to have access to URL and FORM

from the main template, for reasons i don't really want to go into.

382
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 11, 2009 Nov 11, 2009

Step 1 - declare all your local variables with the keyword var after your cfargument tags.

Step 2 - inside your function, refer only to the arguments and variables scopes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 11, 2009 Nov 11, 2009
LATEST

I've done that where i can. This is more or less a quick hack to fix something while i redesign it to support

a new feature correctly. Due to the situation theres some code that is sensitive to URL params being availible inside

the function.

I never knew until now that URL and FORM where pretty much global. I was trying to find out

if i could create a function that ran in a completely private space with no access to the URL and FORM.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources