Twin Cities CFUG November meeting taking shape

We have a great meeting planned for both intermediate as well as brand new CF developers. This meeting is Wednesday, Nov 5th at Easel Training.

Room 1) Kurt Wiersma - BlazeDS
Have you ever wondered what BlazeDS is and what it can do? If so this session is for you. We will cover how you can install BlazeDS inside of CF and how CF can communicate with BlazeDS to make Flex applications get real time messages from ColdFusion.

Room 2) Jason Dean - New Developer Breakout Session
This break out session will be an informal meeting for new developers and for developers who are new to CFML. Bring your questions or just learn the basics of ColdFusion.

Both topics will be presented simultaneously in different rooms. Learn more at colderfusion.com

Dispute with web host gisol.com

Today I got into a financial dispute with my hosting provider of the last 8 months, Global Internet Solutions, gisol.com. They totally misrepresented a special rebate offer, whereby I was supposed to get my hosting plan at only $3.57/month. Apparently, they've done this to countless others, as this "report-gisol.com" website I found today has documented. Warning to all CF developers, never host with this company, they are crooks!

Therefore, this blog is probably going away for the short term until I get going with another host. If/when they shut me down, you can visit my site here, setup under my Comcast ISP hosting. Hopefully I'll be back soon.

Whirlwind trip to BFusion/BFlex was a success

Just got back from the BFusion/BFlex conference and wanted to summarize my weekend. I joined a few local CF developers and we drove 11+ hours to Bloomington, Indiana to attend this FREE 2-day conference put on by some of the Adobe User Groups in conjunction with Indiana University.

Day 1 was ColdFusion focused, and I was in the Intermediate Track. We spent a full day of hands on training learning about the Mach II framework. This was my first formal exposure to a framework and it was great to get a recap of OO principles and see them in action.

Day 2 was Flex focused and I was in the Beginner Track. We started building a basic photo gallery application following the actual Adobe Flex course materials. I only stayed until noon as we had to get back on the road for the long drive home. Plus, I had a similar training back in April at the local Flex Camp in Minneapolis, so I don't think I missed too much.

Highlights of the trip:
- good intro to Mach II, hope to start using it on a small app at work
- my 2nd exposure to Flex, I really need to put this into a work app soon!
- met some new CFers and had a good time at The Upland Brewery restaraunt
- got started on Twitter and now following over 20 others
- scored tons of swag for giveaways at CFUG (CF tag posters, Fusion Authority frameworks issue, Flex Authority first issue, etc)
- won a new book: ColdFusion 8 Developer Tutorial
- arrived there and back home safely as we covered approx 1400 miles by car

Connect for FREE using Adobe ConnectNow

This week I began using Adobe ConnectNow. This tool is a fantastic, money-saving alternative to WebEx or GoToMeeting for desktop sharing meetings. It is a perfect FREE solution for anyone who needs to share his/her screen with only 1 or 2 other people. I often need this capability at work to help support others using a Web application, or to show my coworker halfway across the country a walkthrough of some new development in progress. The only requirement is the Flash player 9 plugin which most people have installed in their Web browser of choice.

ConnectNow features include:

  • unique meeting room URL
  • screen sharing
  • give desktop control to another user
  • webcam
  • chat pod
  • whiteboard

Learn more about ConnectNow at http://www.adobe.com/acom/connectnow

A first-time user must sign up for an Acrobat.com account.
Sign up here - https://www.acrobat.com/#/connectnow/ConnectNowBegin

After this, you can visit the same URL and sign into your meeting room to start a new meeting.

Then you simply share your personal URL with up to 2 others to join your meeting for FREE. For example, here is the format of the personal URL, which I would email to my manager, Joe Smith. Then Joe would join my meeting as a guest.
https://connectnow.acrobat.com/mynamehere

Once Joe Smith submits this form, I receive an alert popup and must click "Accept" to bring Joe into my meeting.

It's as simple as that, thanks Adobe!

PS: While you're checking this out, you should also give BuzzWord a try.

Seal Guard Systems pondering ColdFusion

I've started working with a new client over the past couple of weeks. Ken Wolfbauer and Kathi Wolfbauer of Seal Guard Systems who approached me to help with their HTML and SEO. We have been working together in their great showroom in Blaine, MN. I've suggested that they move their site under ColdFusion. I'm looking forward to working with Ken and Kathi to promote their products and services on the Internet, including Milgard fiberglass windows and Metro steel roofing. Hopefully I'll convince Kathi to start using ColdFusion so we can take their website to the next level.

Useful checks to test for XSS attacks on your ColdFusion site

If you have a ColdFusion page that contains a form with text inputs or uses URL params, make sure you are not vulnerable to a XSS attack. I'm quite novice at this myself, but learning more about it recently.

Here are some inputs to try in your forms or URL param values, if they echo the value back to the user after the page submits/reloads. This is often done on forms with server side validation when 1 or more errors are found, you preserve the fields already typed by the user and give them an error message to try again.

FORM INPUTS
"><blink>XSS</blink>
"
><script>alert("XSS")</script><

FORM TEXTAREA
</textarea><script>alert("XSS vulnerability")</script><textarea

URL PARAM VALUES
">
<script>alert("
XSS")<%2Fscript><
"
><img+src%3Dhttp%3A%2F%2Fintercodes.files.wordpress.com%2F2007%2F10%2Fhacked.jpg><"
"
+onmouseover=alert("XSS")+
click%20here%22%20onmouseover=%22javasript:alert(%27XSS%27)%22

The solution is to wrap any value that echos back on the page in HtmlEditFormat(). For example:

#HtmlEditFormat(URL.firstname)#
or
#HtmlEditFormat(Form.company)#

Even Ray Camden's blog.cfc is vulnerable. To see what I mean, follow these steps:

1) Click here to the contact page

2) Enter the following in the Name field:

"><script>alert("XSS")</script><

3) Click the Send Your Comments button

ColdFusion infinite loop causes Java heap space error

If you get an error page like this, and are scratching your head as to why, it's probably an infinite loop in your CFML code. The error I had was this, and sure enough, I had an out of control loop.

500

ROOT CAUSE:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.io.CharArrayWriter.write(CharArrayWriter.java:105)
at coldfusion.runtime.CharBuffer.replace(CharBuffer.java:37)
at coldfusion.runtime.CharBuffer.replace(CharBuffer.java:50)
at
coldfusion.runtime.NeoBodyContent.write(NeoBodyContent.java:254)
at.........

Putting ColdFusion to sleep

Here is a code snippet that makes the ColdFusion processing "sleep" for the specified number of milliseconds. This works on ColdFusion MX 6 and above, which can expose the Java language from within CFML.

<cfset thread = CreateObject("java", "java.lang.Thread")>
<cfset thread.sleep(3000)> <!--- About to sleep for 3 seconds... --->

ColdFusion 8 introduced a new sleep() function. The above code and the new function are explained in more detail in this ColdFusion Cookbook article.

Creating an HTML fieldset

The following HTML will put a solid border around a block of text, with a bolded label. This code snippet is a nice option for highlighting a section of content on a web page.

<fieldset style="border-color:#FF0000;">
<legend><strong>Amazon Web Services evangelist coming Apr 29</strong></legend>
TCCFUG is proud to be hosting Mike Culver from Amazon.com. Mike will present Amazon Web Services: Web-Scale Computing and What's possible in a post Web 2.0 world. <a href="http://upcoming.yahoo.com/event/396951/">Get the full details</a>.
</fieldset>

Here is what it looks like when rendered...

Amazon Web Services evangelist coming Apr 29 TCCFUG is proud to be hosting Mike Culver from Amazon.com. Mike will present Amazon Web Services: Web-Scale Computing and What's possible in a post Web 2.0 world. Get the full details.

Generating an iCalendar .ics file using ColdFusion

I've been working on a small project at work to allow a user to click a link from an event registration confirmation email, which will open a .ics file in the browser. This special file is in the iCalendar format, and is recognized by MS Outlook, Mozilla Sunbird, and other calendaring tools. It creates an entry in your calendar, with a 30 minute reminder alert, to help you remember to attend the webinar event you registered for. I learned from the vCal() function on cflib.org, and will be submitting my new iCalUS() UDF soon. But here is the code now, as it takes some time to get verified for inclusion on the CFLib.org site.

Download the code in a zip file.

I wrote the function to work in the U.S. and account for daylight savings time. Hopefully developers outside the U.S. can adapt this code to fit their timezones accordingly. Here is the code used for the test submission form and cfcontent/cfheader tags for the following demo.

Change any field(s) below and submit to generate a calendar file: <b>newAppointment.ics</b>
<P>
<cfoutput>
<form method="post">
<table>
<tr>
   <td align="right">Organizer name</td>
   <td><input type="Text" name="on" value="#Form.on#" size="30"></td>
</tr>
<tr>
   <td align="right">Organizer email</td>
   <td><input type="Text" name="oe" value="#Form.oe#" size="30"></td>
</tr>
<tr>
   <td align="right">Description</td>
   <td><input type="Text" name="desc" value="#Form.desc#" size="60"> (use \n sequences for newlines)</td>
</tr>
<tr>
   <td align="right">Subject</td>
   <td><input type="Text" name="sub" value="#Form.sub#" size="30"></td>
</tr>
<tr>
   <td align="right">Location</td>
   <td><input type="Text" name="loc" value="#Form.loc#" size="30"></td>
</tr>
<tr>
   <td align="right">Start Date/Time</td>
   <td><input type="Text" name="st" value="#Form.st#" size="20"> (format: <b>m/d/yyyy HH:mm</b> OR <b>h:mm TT</b> -- this is Eastern time)</td>
</tr>
<tr>
   <td align="right">End Date/Time</td>
   <td><input type="Text" name="et" value="#Form.et#" size="20"> (format: <b>m/d/yyyy HH:mm</b> OR <b>h:mm TT</b> -- this is Eastern time)</td>
</tr>
</table>
<input type="Submit" name="Submit" value="Submit">
</form>
</cfoutput>

<cfif IsDefined("Form.Submit")>
   <cfset eventStr = StructNew()>
   <cfset eventStr.organizerName = Form.on>
   <cfset eventStr.organizerEmail = Form.oe>   
   <cfset eventStr.startTime = ParseDateTime(Form.st)>
   <cfset eventStr.endTime = ParseDateTime(Form.et)>
   <cfset eventStr.subject = Form.sub>
   <cfset eventStr.location = Form.loc>
   <cfset eventStr.description = Form.desc>
   <cfcontent type="text/calendar" reset="Yes">
   <cfheader name="Content-Disposition" value="inline; filename=newAppointment.ics"><cfoutput>#iCalUS(eventStr)#</cfoutput>
</cfif>

Here is a demo of this in action.

-- Update 4/10/08: I submitted the UDF to cflib.org today. Hopefully Ray will post it soon. --

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner