Skip to main content
Inspiring
May 12, 2009
Question

Well to run a <cfquery> I must include a "password" attribute, etc except I have a local server ? yes / no

  • May 12, 2009
  • 1 reply
  • 665 views

I read ALL the textbook
MACROMEDIA CF, 2002 course.com

Well to run a <cfquery> I must include a "password" attribute, etc
except I have a local server ? yes / no

May use/include a file dbinfo.cfm with all my passwords etc , and use
these passwords as variables in <cfquery>,...etc ? this is more secure ?

I must include vars in <cfscript> tag OR many <cfset> tags ?

If I had

<cfscript>

...

password='gf56SDRPO999';

...

</cfscript>

HOW TO INCLUDE THIS VAR IN  <cfquery password=#password# ...> this is correct ?

This topic has been closed for replies.

1 reply

ilssac
Inspiring
May 12, 2009

Your question is unclear to me, but if you just want to verify your syntax is legal, then YES.  You can easily set a value in a variable with <cfscript> and then later use that variable in a <cftag...> like you showed.

But I would argue there is little additional security in using passwords in code like this between setting the password and using it directly in the tag.  There may be reusability and maintainability advantages, but little advantage to security.