Managing custom tags

If you deploy custom tags in a multideveloper environment or distribute your tags publicly, you can use the following additional ColdFusion capabilities:

Securing custom tags

The ColdFusion security framework enables you to selectively restrict access to individual tags or to tag directories. This can be an important safeguard in team development. For more information, see Chapter 16, "Securing Applications".

Encoding custom tags

You can use the command-line utility cfencode to encode any ColdFusion application page. By default, the utility is installed in the cf_root/bin directory. It is especially useful for securing custom tag code before distributing it.

The cfencode tag uses the following syntax:

cfencode infile outfile [/r /q] [/h "message"] /v"2"

The following table describes the options:
Option
Description
infile
The file you want to encode. The cfencode tag does not process an encoded file.
outfile
Path and filename of the output file.
Warning: If you do not specify an output filename, a warning message asks if you want to continue, and the encoded file will overwrite the source file.
/r
Recursive, when used with wildcards, recurses through subdirectories to encode files.
/q
Suppresses warning messages.
/h
Header, allows custom header to be written to the top of the encoded file(s).
/v
Required parameter that allows encoding using a specified version number. Use "1" for pages you want to run on ColdFusion 3.x. Use "2" for pages you want to run strictly on ColdFusion 4.0 and later.

Note:   Although it is possible to encode binary files with cfencode, it is not recommended.

Comments