A dozen Coldfusion programming errors

Possible duplicate:
General programming errors for the ColdFusion programmer to avoid?

The purpose of this question is to enlighten myself, the people I work with, and possibly another programmer by coldness.

For those of you who work in Adobe ColdFusion or are programmed in ColdFusion, which ten mistakes you made, or what should never be done.

I mean to give me the worst of the worst, should never do what should not.

Sometimes it helps to show "What to do", now I want to show "What not to do"

Or perhaps share some of your coding nightmares ...

bring it!

+3
source share
8 answers
  • , , -
  • (#)
  • cfbreak
  • CustomTags "Business Logic", CFC
  • CFC
  • ColdFusion, SQL
  • = "false" CFC
  • , ( )
  • ""
+13

:

  • CFQUERYPARAM
  • ( , , ..) cookie. .
  • HTML/CSS/etc. , .
  • ,
  • Alsays, ; .
+7

- .

+4

, cf newbs, . cfqueryparam!

:

<cfquery name="getSome" datasource="myDB">
  select * from users
  where userID = '#url.userID#'
</cfquery>

:

<cfquery name="getSome" datasource="myDB">
  select * from users
  where userID = <cfqueryparam value="#url.userID#" cfsqltype="CF_SQL_INTEGER">
</cfquery>

(cfqueryparam scanner), , - .

, , , , Hack My CF , . ( - , fyi)

+3

? 3, :

  • try/catch, catch , .
  • Evaluate - 99.5% , .
  • , URL-, .

    < cfset # url.value # = url.dontdothis > <! ---? value = application.dsn -? --- >

+2

.

+2

, LOT . - / .

0

Windows, . .

0

Source: https://habr.com/ru/post/1777922/


All Articles