ColdFusion Posts Around the World
James Moberg
I was unit testing a global UDF that accepts a string and leverages Java's built-in hashCode method to return a signed 32bit integer. This seemed trivial, but I wondered if different versions of ColdFusion that are outside of my internal control would consistently return the same values. I past...
James Moberg
The cfdump tag (AKA cfscript "writedump" function) outputs the contents of a variable of any type for debugging purposes. The variable can be as simple as a string or as complex as a cfc component instance.
If you've ever u...
James Moberg
I recently wrote a blog entry about using a third-party Java library to standardize IPv4 & IPv6 IP addresses using ColdFusion.
The Apache Commons Java library (th...
James Moberg
Our Microsoft IIS web server is configured to accept IPv4 connections and, since 1996, we've recorded IPs in databases using VARCHAR(15). We weren't impacted in 2012 when the ARIN and World IPv6 Launch Day intro...
James Moberg
Standardization & validation is important, but good luck getting all you clients and your client's visitors on board with adhering to ISO standards. When it comes to phone numbers, we've embraced the E.164 international standard (
James Moberg
While integrating a new feature for a client to flag customers that were requesting vouchers to be reissued, a business rule was required to determine whether the action should be performed during the current or next month. My client indicated that anything flagged during the last week of a month...
James Moberg
I referenced Zint Barcode Generator in a post from 2020 and included a very basic command line syntax for a QR code. Zint able to generate 9...
James Moberg
When working on new logic and I want to dump a variable, I often use an internal CF_DumpLite CFC/CFTag that we developed that minimizes HTML output, honors original form & query column order & case, redacts CC values and is
James Moberg
PayPal's NVP/SOAP API for Website Payments Pro accounts suddenly
James Moberg
I recently integrated the auto-generation of survey results into a downloadable PDF using ColdFusion and WKHTMLTOPDF 0.12.6. Our client provided a pre-generated PDF cover page with some editable fields that we prepended to the PDF u...
James Moberg
When displaying values in a table, I like to use color to visually indicate whether the number is high or low. When displaying data on a webpage, it was trivial for us to use the jquery-heatcolor library ...
James Moberg
I wouldn't call myself a regular at conferences, but I've enjoyed attending some CF-related conferences in the past. Luckily my Monument 2 Photo device, a self-hosted Google Photos device, makes...
James Moberg
In the early 2000s, many of our customers still viewed the internet as a passing trend. During this period, we operated a ColdFusion 4.5 (or 5) web application on a Windows server utilizing an Access database. Initially, we relied on a dedicated T1 connection. Over time, we upgraded to a dual T1 ...
James Moberg
We use ColdFusion/CFML to generate valid HTML documents for PDF generation using jsoup & WKHTMLTOPDF. If the generated HTML content is simply outputted onto an existing ...
James Moberg
In one of our projects about 10 years ago, we were fetching HTML fragments from a trusted third-party for inclusion on the website. Instead of using an iFrame or incorporating ajax, which could negatively impact our SEO, we would occasionally fetch the content in the background and update the we...
James Moberg
A ColdFusion application that we developed a couple years ago worked with Twilio to log incoming text messages. The UTF-8 message payloads were saved in a MSSQL database using the NVARCHAR datatype and could be displayed on webpages without any issue. When importing a CSV file into a third-party...
James Moberg
We license data from multiple providers and discovered that not all data can be treated equally even though it's the same specification. For example, we work with two (2) separate Real Estate Transaction Standards (RETS) providers and their implementations are slightly different. The west coast ...
James Moberg
Language detection is a feature that we needed in a past project. I wrote an article in 2020 regarding the use of kju2 fork of th...
James Moberg
Q: How do you solve a problem you don't know how to solve?
A: Turn it into a problem that you do know how to solve.
How can I import data to a MSSQL Se...
James Moberg
(This is a repost from my abandoned tumblr blog; dated 2016-11-17)
A client requested that we spell out numbers on their website in order to clarify some financial totals. I initially planned on using the ColdFusion
James Moberg
There's been many occasions where a user-specific payload has been generated (shopping cart, check out, config settings, processing results) and the user needs to be directed to a new destination with the data, but I want to avoid non-securely passing data as URL or form parameters or having to e...
James Moberg
James Moberg
A CFML developer in the ColdFusion Programmers Facebook Group referenced my DEV article regarding how to identify the SSL expiration date using ColdFus...
James Moberg
I'm getting ready to drive 500 miles to attend to the 11th CFSummit taking place in Las Vegas on October 2-3. I'm looking forward to reconnecting with CFML developers that I've communicated & collaborated with online during my past 26 years of developing in CFML.
I'll be arriving ear...
James Moberg
This is a follow-up to a January 11, 2019 article I wrote on my old Tumber blog.
The Hacker News posted an article regarding the ability to bypass Microsoft Office 365's "Safe Links" security feat...
James Moberg
This ColdFusion UDF converts a date object or string into a UTC, ISO8601, RFC 339, ATOM or W3C string
James Moberg
While reviewing the logs of failed contact form submissions, I identified a couple email address variations that were exploiting some
James Moberg
I was researching methods of converting XML to JSON using ColdFusion. I didn't want to use xmlParse() because ...
James Moberg
While viewing FusionReactor logs for a ColdFusion app, I noticed lots of repetitive JDBC entries in a requ...
James Moberg
I was recently notified of a slow ColdFusion script on a project and, after some isolation, determined that it was due to a regex-based UDF that we used in place of Adobe's built-in function (BIF) for isValid("url"). We used a regex rule with isValid("regex") to validate only HTTP/S URLs with valid...
James Moberg
According to my unit tests, after ColdFusion 2018.0.0-15, Adobe changed the way that CFHTMLHead works with CFContent. Prior to CF2021, any strings that were added to the header buffer via CFHTMLHead was outputted to the HTML HEAD section (or top of the page if you neglected to include a HEAD section...
James Moberg
I'm testing some ideas. I'm not sure if I'm on the right path or not, but thought I'd share.
I have some UDF & CFC libraries that we've built over the year and I have some checks to determine whether default application variables exist and use them to override default values. In order to avoid pos...
James Moberg
Useful to determine if braces are correctly matched before processing. Helps reduce SQLi.
I was using a version of smartSearch from CFLib.org that I had updated with some simple regex detection for SQLi strings, but it wasn't catching everything. I considered disabling the bracket matchin...
James Moberg
Useful for validating a human-entered list of integers.
I was working on a search interface for a client where public visitors would be searching for a range of different values regarding event years, event place, ago, # of competitions, hours of training etc. I initially searched Google...
James Moberg
I still have some CustomTags that we've used in production for years and, now that I'm writing more cfscript, I thought I'd continue using some of them (for now) using the following syntax that I learned about on StackOverflow:
CFML tag-based approach:
CFSc...
James Moberg
I mentioned Exiv2 on a blog post from 2 years ago regarding Supporting ColdFusion with Command Line Programs. Someone in the Adobe ColdFusion Forum recently inquired how to "use ImageGetEXIFMetaData to try to get gps coordinates of an image".
I've been down that road before and have found the buil...
James Moberg
While reviewing reports on Lucee's Dev Forum regarding performance differences between using an application-based CFC singleton and a global UDF, I thought I'd release our replacement for Adobe's CFTimer that I wrote back in 2013.
No more editing "Debugging IP Addresses"
If you wanted to...
James Moberg
Someone on the Lucee website asked how to get width/height of SVG image file in Lucee. I tend use a lot of SVG images when generating PDFs using WKHTMLTOPDF with ColdFusion 2016-2021 and Lucee. I thought I'd try writing a cross-compatible UDF to parse this information. I've added support for desc,...
James Moberg
Anyone aware of any information regarding best practices for client-side cookie generation for ColdFusion/Lucee CFML?
I'm working on an admin tool and created a client-side cookie with an email address or two (for email testing). Upon the next page request using ColdFusion 2016-2021, only the conte...
James Moberg
I'm developing a flexible processing CFML script that accepts (authenticated) FORM posts and processes the data. The data is stored based on form field prefixes, but I don't have any hints regarding which fields may contain a file when processing a "multipart/form-data" form posts. I found Ryan Sti...
James Moberg
I was writing some unit tests to identify the output of CFDump under different conditions and discovered that Adobe and Lucee treat the showUDFs parameter differently. I also use 3rdparty CF_Dump since it provides consistent behavior between CFML platforms. Since I've written my own internal Dumplit...
|