Skip to main content
This topic has been closed for replies.

1 reply

Participant
February 23, 2012

I'm confused about one aspect of UUIDs: In CF9 standard, if I check the "Use UUID for CKToken", it generates a token that has the 8-4-4-16 character group, but in a addition, it is prefixed by another string, so that the CFTOKEN returned looks something like this: 360353802d5624bb-AD53DEC4-E04D-3E5F-F75EA5F06E6AD3A5. Because of that extra prefix, if I try to write the CFToken to a database table, and use it throws the following error:

ERROR INFORMATION:

The cause of this output exception was that: coldfusion.tagext.sql.QueryParamTag$InvalidDataException: Invalid data value 360353802d5624bb-AD53DEC4-E04D-3E5F-F75EA5F06E6AD3A5 exceeds maxlength setting 50.

So, my questions are: when using UUID for CFToken, what should the maxlength be set to to ensure successful writes, where is the prefix before the 8-4-4-16 character group coming from, and what does that prefix represent?

Thanks,

Michael

BKBK
Community Expert
Community Expert
February 23, 2012

ColdFusion prepends the UUID with 16 random hexadecimal characters to make the CFToken even more unique. See the section "Ensuring CFToken uniqueness and security" in the livedocs on managing the client state.

Inspiring
February 23, 2012

ColdFusion prepends the UUID with 16 random hexadecimal characters to make the CFToken even more unique. See the section "Ensuring CFToken uniqueness and security" in the livedocs on managing the client state.

Because, like, a UUID is not unique enough already.

:-|

I do wonder about them (Adobe) sometimes.  [Shrug].  Maybe there's some good reason to do this that I'm not seeing.

--

Adam