coldfusion-9

How do you deep clone a persistent entity in ColdFusion ORM?

徘徊边缘 提交于 2019-12-23 19:11:09
问题 I have a persistent entity that I'm using as a template: Company Locations Departments Employees In other words, a Company contains many Locations , which contains many Departments , which contains many Employees . I have one Company set up as a template that should be copied when a new company is created. However, this template is persistent in the database. I tried using the following code to deep clone it: var template = EntityLoadByPK("Company", 13); var company = Duplicate(template);

Fix for Unicode Transformation Issue/Vulnerability in ColdFusion

十年热恋 提交于 2019-12-23 18:27:09
问题 We upgraded our security scanner recently, and it's reporting a new issue. What's the recommended fix? (We happen to be on ACF9.) (Also, if you have an example exploit geared to CF, I'd appreciate it.) Unicode transformation issues Severity High Type Configuration Reported by module Scripting (XSS.script) Description This page is vulnerable to various Unicode transformation issues such as Best-Fit Mappings, Overlong byte sequences, Ill-formed sequences. Best-Fit Mappings occurs when a

How can I get the parent of the current file?

淺唱寂寞╮ 提交于 2019-12-23 18:00:33
问题 To get the current *.cfm file I use: GetFileFromPath(GetCurrentTemplatePath()) Is there a simple way to get the parent of the current file? I.e. if the current file is ...\MyApp\Users\addUser.cfm I want to return Users . Edit: the reason I want to do this is to check for access permission. Depending on path different policies will be enforced. Edit: The linked question doesn't provide the correct answer. 回答1: GetFileFromPath(GetFileInfo(GetCurrentTemplatePath()).parent) This will return

Is there a difference with the HTMLEditFormat function in ColdFusion CF9 versus CF10?

我只是一个虾纸丫 提交于 2019-12-23 14:02:32
问题 I'm seeing a difference in how HTMLEditFormat works in CF9 and CF10. HTMLEditFormat(">") In CF9: showing up as ">" (no difference) In CF10: showing up as ">" (double-escaped, which seems correct to me) I've looked through the CF10 notes and reviewed the HTMLEditFormat documentation, but cannot find any mention of there being a difference in how this function works. Does anyone know of a difference, or know of documentation that proves there is no difference? ...Or know of any other

Can Coldfusion components share methods without being descendants of the same super class

送分小仙女□ 提交于 2019-12-23 13:02:14
问题 We have used a homegrown version of object oriented coldfusion for a while and I'm just starting to experiment with cfc's and how it "should" be done... If I understand correctly, cfinterface defines the signature of functions, and any class that implements that interface must have their own functions to do whats defined in the interface. I'm kind of trying to do the opposite - the interface doesn't just define the function's signature, but also defines the logic of the function and anything

coldFusion jvm Garbage Collection not

五迷三道 提交于 2019-12-23 12:56:15
问题 I have a cfc method that is looping through a list and making a series of SOAP calls via cfhttp. Then inserts the result into a database. The process itself works great the problem is that the java memory slowly fills up and eventually (depending on the number of elements in the records being returned) just stops working. There is no error or anything visible it just stops. If I look at the application log file via the coldfusion admin I see one or both of the following errors: GC overhead

coldFusion jvm Garbage Collection not

梦想的初衷 提交于 2019-12-23 12:54:59
问题 I have a cfc method that is looping through a list and making a series of SOAP calls via cfhttp. Then inserts the result into a database. The process itself works great the problem is that the java memory slowly fills up and eventually (depending on the number of elements in the records being returned) just stops working. There is no error or anything visible it just stops. If I look at the application log file via the coldfusion admin I see one or both of the following errors: GC overhead

CFPDF create variable from a BLOB

拜拜、爱过 提交于 2019-12-23 05:16:41
问题 In ColdFusion 9 we have pdf data stored in a blob in the database. How do I get that into a cfpdf variable? It seems like all options require a filename. Is there a way to do it without writing a file? 回答1: CFPDF and CFDOCUMENT are for creating and modifying a PDF dynamically. As you already have the PDF in a blob in your database you simply need the CF page to send it back as part of the response using CFCONTENT . Assuming you are using some type of ID to reference which PDF you want to

Coldfusion Encryption/Decryption issue

ぐ巨炮叔叔 提交于 2019-12-23 02:36:42
问题 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)> 回答1: Ok, well first, I have to

Need suggestion for running a JPA + Hibernate java project on Coldfusion 9

梦想与她 提交于 2019-12-22 13:46:24
问题 I have a java project that uses JPA 2/Hibernate 3.5.6 for data access and it works great on a JBoss app server. Now I am trying to run this on a Coldfusion 9 environment and I see CF 9 already has hibernate3.jar and related jars thats needed for its ORM implementation. But, I would like to use my java project as is on CF and for that, I would need the same hibenate 3.5.6 jar and related jars on CF. So, I moved all the jars that I need, created a new folder in CF and updated the jvm.config to