coldfusion

Receive and log webhook post

别来无恙 提交于 2019-12-31 04:06:39
问题 I have an account set up with Stripe.com. I have configured a webhook for testing and am sending test posts to a cfm page that "receives" these requests. However, I am not sure that this page is doing what it should be. Currently, I just dump out all data. Below is what the page code looks like. When I run the page locally, or call it directly on our live test site, I get an email with all the data as expected. However, if I set the page up as a webhook url and then get Stripe to send a test

jquery cfml trigger('change') not working

ぐ巨炮叔叔 提交于 2019-12-31 03:34:06
问题 What I need is a cfselect bound to a query that lists file types, a cfdiv that lists the saved files, and a button that scans an image to be saved as a pdf file with the name prefixed by the value of the input field. Simple page. <cfselect name="DocType" id="DocType" class="selectClass" query="qGetDocTypes" display="name" value="DocTypeID"> <input name="ScanDocument" id="ScanDocument" type="text" value="" class="ScanDocument"> <cfdiv id="handler_#docAreaID#" bind="url:#request.controlurl

ColdFusion: How to insert a list with a static foreign key in one insert?

社会主义新天地 提交于 2019-12-31 03:22:07
问题 I have a list like this thing1,thing2,thing3. And I want to insert them into a look-up table with the same foreign key. So ideally it would look like this: <cfquery datasource="#ds#" result="insert_things"> INSERT INTO lkp_things (foreign_key, thing) VALUES (1, thing1), (1, thing2), (1, thing3) </cfquery> It seems like the only way to accomplish this is to turn the list into a query, but I'm wondering, is there is a simpler way? Here's what I've tried: <cfquery datasource="#ds#" result=

CFQUERY Not escaping single quotes properly [duplicate]

一世执手 提交于 2019-12-31 02:58:11
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Coldfusion adding extra quotes when constructing database queries in strings All, I am trying to use a getter to reference a bean during an insert. CF is not escaping the single quote properly in the value in 'form.title' and therefore I am receiving a malformed sql error. Any ideas? Here's the code. <cfscript> form.title = "page's are awesome"; page = new model.page.page(argumentCollection = form); <cfquery

Customize baseUrl and baseDir in CKFinder

吃可爱长大的小学妹 提交于 2019-12-31 02:11:11
问题 We use CKEditor and CKFinder for Coldfusion in many of our CMS applications. These apps point to different sites on our server, so we want CKFinder setup to upload files to directories specific to each app. But we one want one shared location for the CKEditor and CKFinder files on the server. In the config.cfm file, we have setup the default baseURL and baseDir like this: config.baseUrl = "http://www.oursite.com/_files/site1/ckfinder_uploads/"; config.baseDir = '\\ourserver01\_files\site1

Storing file name when uploading using Coldfusion

☆樱花仙子☆ 提交于 2019-12-31 01:53:05
问题 I am trying to store the filename of the selected file to be uploaded into a hidden input field on the form. my form looks like this <form id="uploadattachment" enctype="multipart/form-data" method="post" action="/governance/attachmentfilestore"> <cfif isDefined("fileUpload")> <cffile action="upload" fileField="fileUpload" accept="application/pdf" nameconflict="makeunique" destination="#ExpandPath( '/files/governance/upr/' )#"> <input type="hidden" name="filename" id="filename" value="">

How to create a cfspreadsheet with protected cells

旧城冷巷雨未停 提交于 2019-12-31 00:56:11
问题 I am creating a spreadsheet object using cfspreadsheet. Would like to make some of the individual cells as protected (read-only). Please let me know if anybody has tried this before. I did try putting cell format as locked but it did not seems to work. Here is the sample code: <cfset a = spreadsheetnew()> <cfset format1 = structNew()> <cfset format1.locked=true> <cfset SpreadsheetFormatCell(a,format1,1,1)> <cfspreadsheet action="write" filename="#expandpath('.')#/test.xls" name="a" overwrite=

Decrypting a string in ColdFusion encrypted with 3DES in C#

烂漫一生 提交于 2019-12-31 00:42:31
问题 We are having difficulty decrypting a string in ColdFusion that was previously encrypted with 3DES and C#. Here is the code we used to encrypt the string initially: public static string EncryptTripleDES(string plaintext, string key) { TripleDESCryptoServiceProvider DES = new TripleDESCryptoServiceProvider(); MD5CryptoServiceProvider hashMD5 = new MD5CryptoServiceProvider(); DES.Key = hashMD5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(key)); DES.Mode = CipherMode.ECB; ICryptoTransform DESEncrypt

Using cachedwithin attribute inside cfquery

早过忘川 提交于 2019-12-30 18:57:13
问题 When you use the cachedwithin attribute in a cfquery how does it store the query in memory. Does it store it by only the name you assign to the query? For example, if on my index page I cache a query for an hour and name it getPeople will a query with the same name on a different page (or the same page for that matter) use the cached results or does it use some better logic to decide if it is the same query? Also, if there is a variable in your query does the cache take into account the value

Encrypting in Coldfusion and then decrypting in PHP

强颜欢笑 提交于 2019-12-30 18:28:31
问题 I have a problem reproducing the same result generated in PHP vs Coldfusion. In PHP encrypting this way: <?php $key = "$224455@"; $Valor = "TESTE"; $base = chop(base64_encode(mcrypt_encrypt(MCRYPT_DES, $key, $Valor, MCRYPT_MODE_ECB))); ?> I have the result: TzwRx5Bxoa0= In Coldfusion did so: <cfset Valor = "TESTE"> <cfset Key = "$224455@"> <cfset base = Encrypt(Valor,ToBase64(Key),"DES/ECB/PKCS5Padding","BASE64")> Result: qOQnhdxiIKs= What isn't ColdFusion yielding the same value as PHP?