coldfusion-9

dynamic pdf-cfdocument + cfcontent + image + email attachement

别说谁变了你拦得住时间么 提交于 2019-12-09 03:23:26
问题 How can images be loaded into a dynamically generated pdf (cfdocument)? In that the pdf is not stored the hdd. The pdf needs to be emailed, and the ram cleared. The images are stored outside of the wwwroot folder. If it is need be, the pdf can get stored in the hdd, get attached, emailed, then deleted, but would opt for it not to get stored in the hdd. c:\coldFusion9\imgs\ is the dir Sample: <cfdocument format="PDF" localurl="true"> <cfoutput> #vars#</cfoutput> </cfdocument> I have used <img

ColdFusion: Are there any use cases where an Application.cfm is preferable to an Application.cfc

谁说胖子不能爱 提交于 2019-12-08 20:35:23
问题 I'm in the process of upgrading a large legacy ColdFusion application that heavily utilizes Application.cfm template files instead of the newer Application.cfc files. It seems that Application.cfc offer a cleaner more efficient solution to everything that a Application.cfm file can do. An Application.cfm runs every line sequentially for every request, so it would recreate application variables on every subsequent new page query. (Can cause performance hit if many application variables loaded)

String index out of range error when URL contains two dots

混江龙づ霸主 提交于 2019-12-08 13:48:32
问题 I have a ColdFusion 9 server which serves the following error on any ColdFusion page where the URL contains the characters .. after a / e.g. http://www.example.com/..cfm or http://www.example.com/..foo/bar.cfm : String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.delete(AbstractStringBuilder.java:698) at java.lang.StringBuffer.delete(StringBuffer.java:373) at coldfusion.util.Utils.collapseDotDots(Utils.java

Why is CFMAIL ignoring all but the first row of a query when using CFScript?

…衆ロ難τιáo~ 提交于 2019-12-08 04:43:06
问题 I'm trying to use CFmail in a CFScript CFC. I want CFMail to iterate through a query, and change values based on the query contents. It does this just fine, as long as the query object only has 1 row. If it has multiple rows (e.g. 5 rows), it will send 5 emails, but each email will contain the values from the first query row. I've tried a few different things. See below: Query Obj: Name | Email | Number ---------------------------------- John | john@foo.com | 12 Bill | bill@bar.com | 42 Ann |

Best way to check if value is integer ? Coldfusion 9

折月煮酒 提交于 2019-12-08 03:20:46
问题 I have fields to test and make sure they only accept integers . There is few functions but I wasn't sure which one is the best. First I tried isValid("integer",value) but I have discovered that "1,5" will be accepted as an integer. So then I tried isNumeric(value) but this will accept values like 1.5 . I'm wondering what should be the best way to check for integers? Maybe two combine these two functions like: <cfif isValid("integer",value) AND isNumeric(value)> Or there is better way to do

Encrypt in ColdFusion, Decrypt in C#

雨燕双飞 提交于 2019-12-08 02:27:36
问题 I have a string that was encrypted with ColdFusion 9 using the encrypt() function. The problem is that the function was called using the the UUEncode algorithm (default). I need to decrypt this value using C#. All of the samples use Base64 encoding. Any ideas? Here's what was used in ColdFusion <cfset encryptionKey = generateSecretKey( "AES" ) /> <cfset pwhash = encrypt( user_password, encryptionKey, "AES", "UU" ) /> I have the resulting values. I also have the resulting decrypted value for

How to implement the OWASP ESAPI validator with groups of validation attempts in ColdFusion?

旧城冷巷雨未停 提交于 2019-12-07 12:16:30
问题 I have been playing around with the OWASP ESAPI utilities that are included with ColdFusion 9. ColdFusion's Builtin Enterprise Security API. The encoder utilities are pretty straight forward and I believe I have them working fine. My problem is with the validator utilities. I can get them to work singly . That is, if I call the validator.getValidInput() method with "invalid" data it will throw an error that I can catch. However, when I try to call the validator method in batch I get a null

how to loop over the tables of a database?

泪湿孤枕 提交于 2019-12-07 09:01:07
问题 I am trying to loop over the tables of a database using the following code getting an error java.lang.UnsupportedOperationException . i have even tried with cfloop query and other attributes got errors complex value can't convert to simple value. can anyone tell me how shall i have to loop over this query ? Thanks. <cfquery name="q" datasource="datasource"> SHOW TABLES FROM datasource </cfquery> <cfloop collection ="#q#" item="i"> #q[i]# </cfloop> 回答1: You are getting that error because

ColdFusion SessionTracker and forcing the session to end

て烟熏妆下的殇ゞ 提交于 2019-12-07 07:07:15
问题 I'm using the ColdFusion 9 coldfusion.runtime.SessionTracker to monitor currently logged in users using the following code. app = application.getApplicationSettings().name; sessiontracker = createObject("java","coldfusion.runtime.SessionTracker"); sessionCollection = sessionTracker.getSessionCollection(app); Which returns a struct of jsessionid 's and the session's variables for all the currently active sessions. Is it possible to force a session to end given I have the jsessionid effectively

Coldfusion Encryption/Decryption issue

[亡魂溺海] 提交于 2019-12-06 20:38:31
I recently did a website for my company using ColdFusion 9. The issue I am having is with the ColdFusion encryption/decryption function. On certain strings that I decrypt I get these weird special characters that show up. Example: MK/_0 <---Encrypted String Outputted �#5&z <---Decrypted String Outputted I'm not sure why this is happening (and only on certain strings that get decrypted). Here is the code: <cfset ccNum = decrypt(getCCInfo.CUST_CARDNUMBER,myKey)> Ok, well first, I have to point out that by not specifying an encryption algorithm you are using very POOR encryption. So you'll need