coldfusion-9

Membership SHA1 hash not the same for all users

我的梦境 提交于 2019-11-29 16:03:23
I have a user table that was in plain text and migrated it to Membership provider. Using ColdFusion (current system) I managed to HASH one user's password (test user) and it matched perfectly. But now the subsequent users do not match. What am I doing wrong. <cfscript> theEncoding = "UTF-16LE"; thePassword = "dtD3v310p3r!"; base64Salt = "JZjdzUXREM0A7DPI3FV3iQ=="; theSalt = charsetEncode( binaryDecode(base64Salt, "base64"), theEncoding ); theHash = hash(theSalt & thePassword, "SHA1", theEncoding); // hash always returns hex. convert it to base64 so it matches DNN theBase64Hash = binaryEncode

SerializeJSON doesn't encode UTF8 characters in ColdFusion 9

只愿长相守 提交于 2019-11-29 13:36:10
I'm having some issues with ColdFusion and JSON. My users have filenames and other key words with characters like ç in them which is causing me a pain when I have to pass them back via JSON. When I use the magic JSON command on my variable: <cfcontent type="application/json"> <cfset variables.stGalleryItem = StructNew() /> <cfset variables.stGalleryItem["imagePath"] = siteRoot & '/images/350460/hellç.txt' /> <cfset variables.stGalleryItem["title"] = 'çççç' /> <cfset variables.stGalleryItem["author"] = 'HI' /> <cfset variables.stGalleryItem["text"] = 'aa' /> <cfset ArrayAppend(variables

Spreadsheet Cell Formatting

夙愿已清 提交于 2019-11-29 12:24:00
Edit at the end Can anyone see what I am doing wrong? These are my expectations and observations: I expect a worksheet named Search Parameters to have cell a1 in bold red font. I get what I expect. I expect a worksheet named "4D,CCCU,SDAU" which has data starting in row 3. I get this. I expect row 3 to have the text "bold font 3 green true", and to be in bold green font. I get the text, but I get bold red font, which matches cell a1 in the other sheet. In fact, the formatting in this cell will always match cell a1 from the other sheet. I expect the remaining cells to have a value like "normal

ColdFusion 9 Dynamic Method Call

妖精的绣舞 提交于 2019-11-29 07:32:29
I am trying to work out the correct <cfscript> syntax for calling a dynamic method within ColdFusion 9. I have tried a number of variations and had a good search around. <cfinvoke> is clearly the tag I want, sadly however I cannot use this within my pure cfscript component as it was implemented in ColdFusion 10. i.e coldfusion 9 dynamically call method I have tried the following within my CFC: /** Validate the method name **/ var resources = getResources(); if (structKeyExists(variables.resources, name)) { variables.resourceActive[name] = true; var reflectionMethod = resources[name]; var

Memory Leak Looping cfmodule inside cffunction

左心房为你撑大大i 提交于 2019-11-29 06:56:31
Googlers if you've got a heap dump with a root of coldfusion.runtime.CFDummyComponent read on. Update 2/22/2011 Marc Esher of MXUnit fame found the exact same bug in a different context . His solution involves a large loop over a query solved by going from query="name" to from="1" to="#name.recordcount#" index="row" . Another approach that works is using <cfthread> inside the loop as such: <cfloop ...> <cfset threadName = "thread" & createUuid()> <cfthread name="#threadName#"> <!--- do stuff ---> </cfthread> <cfthread action="join" name="#threadName#"> </cfloop> This is very effective when you

Why isvalid(“integer”,“1,5”) = YES?

偶尔善良 提交于 2019-11-29 06:08:50
Why does #isValid("integer","1,5")# output YES? I expected it to output NO like #isValid("integer","1.5")# does. I'm going to validate with <CFIF isvalid("integer","1,5") AND isnumeric("1,5")> ... Henry Adobe is aware of this, but... State: Closed Status: Withdrawn Reason: AsDesigned https://bugbase.adobe.com/index.cfm?event=bug&id=3169196 TBH I'm a little embarrassed to be using a language that can't even validate integer correctly. UPDATE: Guess what, it'll be addressed in CF12 ! There is no doubt that this behavior is incorrect. It is obviously wrong and it should be corrected. However, it

Things to watch out for in ColdFusion 9 with CF-ORM

给你一囗甜甜゛ 提交于 2019-11-28 16:23:56
What are some of the things you've observed in ColdFusion 9 with CF-ORM (Hibernate) that one should watch out for? Henry entity init() method must not have required argument(s), otherwise EntityNew() and other CF-ORM actions will break. You may want to use a Factory to create the entity, and enforce the required arguments there. A bug regarding this limitation has been filed in the Adobe Bugbase. ORMReload() with ormsettings.dbcreate = "drop create" might not drop all tables for you. CF9 Cumulative Hot Fix 1 improves this a little bit, but you might want to drop the tables in DB yourself. type

Passing more then 100 arguments to ColdFusion function throws an error

自古美人都是妖i 提交于 2019-11-28 12:09:47
There is a ColdFusion function where we have to pass more then 100 arguments to get a search result. When passing these 100 odd parameters into the function, ColdFusion throws the error: " 404 not found " I tried to increase post size Limit in CF server settings from 100 to 300 but am still getting the error. Increasing the "post size limit" only changes how many megabytes can be received, not the quantity. For that, you need to increase the "post parameters limit" in neo-runtime.xml , by adding* or updating the XML node: <var name='postParametersLimit'><number>300.0</number></var> Then save

When ColdFusion is maxing out the CPU, how do I find out what it's chewing/choking on?

纵然是瞬间 提交于 2019-11-28 11:09:23
I'm running CF 9.0.1 on Ubuntu on an "Medium" Amazon EC2 instance. CF has been seizing-up intermittently (several times per day...but notably not isolated to hours of peak usage). At such times, running top gets me this (or something similar): PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+COMMAND 15855 wwwrun 20 0 1762m 730m 20m S 99.3 19.4 13:22.96 coldfusion9 So, it's obviously consuming most of the server resources. The following error has been showing up in my cfserver.log in the lead-up to each seize-up: java.lang.RuntimeException: Request timed out waiting for an available thread to run.

Membership SHA1 hash not the same for all users

与世无争的帅哥 提交于 2019-11-28 10:03:43
问题 I have a user table that was in plain text and migrated it to Membership provider. Using ColdFusion (current system) I managed to HASH one user's password (test user) and it matched perfectly. But now the subsequent users do not match. What am I doing wrong. <cfscript> theEncoding = "UTF-16LE"; thePassword = "dtD3v310p3r!"; base64Salt = "JZjdzUXREM0A7DPI3FV3iQ=="; theSalt = charsetEncode( binaryDecode(base64Salt, "base64"), theEncoding ); theHash = hash(theSalt & thePassword, "SHA1",