Entries Tagged as 'ColdFusion'

CGI Facade - Why You Should Use One

ColdFusion , Security 6 Comments »

CGI Facade?! I'm sure you are saying, I've heard of a Session Facade, but why a CGI Facade...

Well, simple really. Web Servers are evolving, and sooner or later, you'll put a device or a server in between you firewall and your web server, like a clustering device or a reverse proxy like my current favorite, NGINX (see previous post for details).

NGINX, for example, will accept http requests on port 80, and forward them to your web server. In doing so, the web server thinks the request is coming from NGINX and not from the outside world. Your CGI vars, notably REMOTE_ADDR and REMOTE_HOST will get skewed with the IP of NGINX. A lot of times you will run NGINX on the same physical server and the CGI variables will start displaying 127.0.0.1.

This can be a problem. For example, you may be using the IP for logging, or for configuration based on the dev environment. ColdFusion is not smart enough to know who the original requester is. But its only partially at fault.

When NGINX gets the request, as you'll see from sample configs, it DOES pass who the original requester is. It creates new HTTP headers and passes them off to the web server. Here are two lines, see if you can follow:

proxy_set_header    X-Real-IP       $remote_addr;
proxy_set_header    X-Forwarded_For $proxy_add_x_forwarded_for;

As you can see, its adding two headers: "X-Real-IP" and "X-Forwarded_For" with the IP of the requester. In your CGI Facade, you don't want to rely on REMOTE_ADDR and REMOTE_HOST, and instead, if the header has these values, pass them instead for whatever use case you may have. In face I would recommend you do that now so as to future proof your apps.

This is not a new problem. Many people are familiar with SQUID, and that too sets headers as it proxies. So get to it!

ColdFusion & NetSuite - Need Help

ColdFusion No Comments »

Does anyone have any experience working with NetSuite by using ColdFusion?

I was wondering what sort of stories you can share - the good and the bad.

CFQueryParam Scanner Broken on CF9

Server , Adobe , Tools of the Trade , ColdFusion 4 Comments »

Just an FYI. I ran CFQueryParam Scanner (latest from RiaForge) on my local CF9 box, and got this error:

Invalid name for user-defined function.
The name Variables.Struct contains illegal characters.
The CFML compiler was processing:
* A cffunction tag beginning on line 4, column 2.
The error occurred in \qpscanner\index.cfm: line 4


  

I changed the function named "Variables.Struct" to "Variables_Struct" and ran it to get this error:
Variable STRUCT is undefined.
The error occurred in \qpscanner\index.cfm: line 16



Cumulative Hot Fix 4 for ColdFusion 8.0.1

Adobe , News , ColdFusion 1 Comment »

Download today!

More details @ http://kb2.adobe.com/cps/529/cpsid_52915.html.

CFWheels 1.0 is out!

News , Tools of the Trade , ColdFusion 1 Comment »

A very promising framework modeled on Ruby on Rails has finally hit Version 1.0.

Find out more @ http://cfwheels.org/.

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds