Tag Archives: ColdFusion

Komodo-CFML: Minor update

I posted an updated version of Komodo-CFML for download. Nothing really significant, but there are a few minor changes to the syntax highlighting for CSS, HTML, and JavaScript in CFML files for consistency with the Komodo-provided highlighting in separate files of those types. In addition, this version will successfully install and work in the recently-announced Komodo 8 alpha releases.

Komodo-CFML: minor updates

I’ve just pushed a couple of minor updates to Komodo-CFML:

  • Better highlighting for numerical HTML character entities to address some goofiness based on their inclusion of the “#” character (e.g., #)
  • Fix to the DTD for ACF10 to address an error in the Adobe tag documentation for the CFIMAGE tag

I’ve also updated the example configuration file for HTMLTidy that I use to let Komodo know which CFML tags are considered valid tags to include the new tags brought to the table by ACF10.

Both of these updates are available on the Komodo-CFML page.

I’m currently working on building a DTD specific to the Railo CFML engines, and hope to provide support for both their current v3.3.x and preliminary v4.x products at some point in the next couple weeks.

Komodo-CFML v0.2.1: Support for ColdFusion 10

I have updated Komodo-CFML to provide preliminary support for Adobe’s ColdFusion 10 (ACF10) CFML language changes in ActiveState‘s Komodo IDE and Edit editors. I’m calling it “preliminary” at this time because ACF10 is in beta and because I have manually harvested these language changes from Adobe’s “ColdFusion 10 Beta New Features Notes” document (available here). I expect there to be some tuning of these changes by the time ACF10 becomes real. I also have a couple questions open on the ACF10 beta forums asking for clarification on items I see in the Adobe notes document that appear to be omissions or inconsistencies.

This version also includes a handful of minor fixes to errors and inconsistencies in the ACF9.01 tags and attributes that I noticed in assembling the changes to support ACF10, so even if you are not yet interested in playing with the ACF10 beta I’d recommend updating to this version of the editor extension.

To switch to the ACF10 tags and attributes, change the “Default HTML Document Type”  selection in Komodo’s preferences at Preferences > Languages > HTML to refer to the  entry toward the bottom of the provided list identified as “-//WE3GEEKS//DTD HTML 5 + CFML (Adobe ColdFusion 10)//EN”.

Download: cfml-0.2.1-ko.xpi

And, as always, feedback is welcome.

Tomcat: An IPv6 Address Filtering Gotcha

This is another in my series of short posts covering my efforts to stand up a Tomcat/ACF10 development environment. For background, see the first post in the series.

In my previous post, I revisited allowing access to pages served up by Tomcat to just requests originating from the local system. In that post, we looked at use of Tomcat’s Remote Address Filter in order to have any denied requests be provided with a custom error page. As I noted, however, when I tried to access my Tomcat server via an IPv6-based URI (e.g., http://[::1]:8501/test.cfm), my request was being denied even though I had configured the filter to allow access to requests from the following addresses (specified via regex):

  • 127\.\d+\.\d+\.\d+
  • ::1
  • 0:0:0:0:0:0:0:1

Given the second and third of those address specifications, I would have expected my request to have been allowed. This is where having access logs configured comes in handy. Those logs showed these requests coming from 0:0:0:0:0:0:0:1%0 and being denied. OK… what’s with that trailing “%0″?

A bit of digging and I had my answer: the IPv6 address specification includes something called “scopes” that may be present. That “%0″ is the default scope and (as the default) is optional. The RFC for these scopes is pretty fuzzy, so for now will allow for an optional non-negative decimal integer for the scope (per the RFC) and if we ever end up with something else (which the RFC indicates is possible) we will revisit this. We will update our regexes to account for the possible presence of the scope:

  • 127\.\d+\.\d+\.\d+
  • ::1(%\d+)?
  • 0:0:0:0:0:0:0:1(%\d+)?

Update the list of address regexes in the filter definition, bounce the server, and Tomcat should now allow requests when invoked with an IPv6-based URI. Now we can get back to looking at the extent to which ACF10 supports IPv6.

A final thought on this: you may or may not encounter this, as I have the distinct impression this behavior is a function of the environment (at least the OS and/or the JDK under Tomcat). I’ve blogged it simply because I tripped over it.

Tomcat: Revisiting IP Access Restriction

This is another in my series of short posts on configuring Tomcat as I get a Tomcat/ACF10 development environment configured. For a bit of background, see the first post in the series.

We took a quick look earlier at restricting access to my Tomcat server based on the IP address from which the request originated. In that first take, we used Tomcat’s Remote Address Valve component to restrict access to just requests from the local system. In that post, I indicated we would probably look at this subject again in the future. Here’s my second look… and I know we have at least one more coming.

One of the first items I plan on digging into with ACF10 is how it deals with IPv6. As I started poking around the edges of this, I discovered two things that merited further investigation:

  1. Requests to my local server with an IPv6-based URI (e.g., http://[::1]:8501/sample.cfm) were being blocked despite the inclusion of the IPv6 versions of the local server address (i.e., ::1 and 0:0:0:0:0:0:0:1) in our earlier Valve-based set of allowed addresses, and
  2. I was not seeing my custom 403 error page that I expected, based on my earlier work to configure one

To figure out what’s going on with the second of those two items, let’s look at where the addressed-based restrictions were implemented vs. where the custom error pages were configured:

  • My Valve-based address restrictions were implemented within the Host element in ./cfusion/runtime/conf/server.xml
  • My custom error pages were configured in the web-app element within ./WEB-INF/web.xml

It’s not too big a leap to see that the two items are configured at two different levels within the overall configuration of Tomcat and the ColdFusion Web application. This is one of those places I’ve bumped into the “there is more than one way to get there” aspect of Tomcat. Tomcat also provides a Remote Address Filter which provides the same functionality as the valve we used in our first run at this. As a filter, it is configured for the Web application (i.e., at the same level as our custom error pages) so it made sense this might address problem #2 from above.

Add the following filter specification to ./WEB-INF/web.xml as the first filter:

<filter>
   <filter-name>Remote Address Filter</filter-name>
   <filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class>
   <init-param>
      <param-name>allow</param-name>
      <param-value>127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1</param-value>
   </init-param>
</filter>
...

Add the following filter-mapping specification to the same file as the first such mapping:

<filter-mapping>
   <filter-name>Remote Address Filter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>
...

Remove the corresponding Valve specification from ./cfusion/runtime/conf/server.xml. Bounce the server and verify that the custom error pages are still being served appropriately.

In my next post, we’ll figure out what’s going on with IPv6-based URI’s and why we’re still being blocked (although now we at least get our custom error page). And as noted above, we’ll revisit this whole subject of address-based access restrictions at least one more time in the future.