http://coldfusion.com logo
Join SlackCommunities
Powered by
# cfml-general
  • g

    Gareth

    12/13/2022, 11:50 PM
    Anyone using glowroot to monitor Lucee or CF ? Seems to be pretty good in general, apart from not really being able to use url params to identify different requests.
    r
    • 2
    • 4
  • g

    Gary Corcoran

    12/14/2022, 12:03 PM
    Hi All, anyone using ckfinder with S3? Looks like the newer versions of ckfinder work with it but dont have plugins for CF?
  • s

    Slackbot

    12/14/2022, 1:15 PM
    This message was deleted.
    z
    r
    a
    • 4
    • 3
  • d

    davla

    12/14/2022, 3:27 PM
    Please tell me if trycf.com with Lucee 5 is having an issue - I am getting a syntax error on the following:
    Copy code
    <cfscript>
    writeOutput('hello world');
    </cfscript>
    I was originally trying some slightly more advanced code and the syntax errors wouldn’t go away. So tried the above as the simplest line of code - but still seeing:
    Copy code
    There was an error parsing your code. This usually indicates a missing ; or another compile time syntax error. Check your syntax and try again.
    All working on Lucee 4.5 engine. Guessing I have a bad Lucee 5 instance.
    d
    a
    +2
    • 5
    • 9
  • p

    pmascaricfml

    12/15/2022, 8:01 PM
    Anyone used the Zoom API much, or created a Zoom App? Specifically, before I try tackling it myself, I'm wondering if anyone has some ready code to help with decrypting the X-Zoom-App-Context header when loading a Zoom app. https://marketplace.zoom.us/docs/zoom-apps/zoomappcontext/
  • w

    WilzDezign

    12/16/2022, 9:14 AM
    Looking for feedback/practices when standing up ColdFusion 2021 in AWS. Now we know there is the AWS AMI for ColdFusion (Windows) which shows cost of $0.46/hr to start with, but what about installing it directly on an EC2 using S3 and some RDS of choice? What are some pitfalls experienced along the way? What are configuration choices when hosting on an EC2 that we should be aware of? Is it easier to get it setup in Linux/Apache? What do you use for the local DEV before pushing PROD to AWS, CF Docker?
    d
    • 2
    • 1
  • d

    davla

    12/16/2022, 1:21 PM
    I am trying to take an array of structs with various keys and be able to filter each struct to only return a subset of the data. For example:
    Copy code
    aPartners = [
      {
       "partnerid":1,
       "partnername": "Partner 1",
       "partnercode": "pt1",
       ...
       "configsettings: {
         ...
       } 
      },
      {
       "partnerid":2,
       "partnername": "Partner 2",
       "partnercode": "pt2",
       ...
       "configsettings: {
         ...
       } 
      }
    ];
    allowedKeys = ["partnername","partnercode"];
    How to process the above (arrayReduce/Map etc) to produce an array of structs with just partnername and partnercode in each struct. I tried this but it doesn’t work as needed:
    Copy code
    allowedKeys = ["partnername","partnercode"];
    for(partner IN aPartners) {
        objKeys = structKeyArray(partner);
    	result = objKeys.reduce(function(accumulator, ele)  {
            if( allowedKeys.findNoCase(ele) ) {
    			obj = {
    				"#ele#": partner[ele]
    			};
    			return accumulator.append(obj);
    		} else {
    		    return accumulator;
    		}
    	}, []); 
    };
    What should I be using?
    t
    a
    • 3
    • 17
  • d

    Dave Merrill

    12/16/2022, 1:47 PM
    What's the modern performant way to parse tab-tab-return data into an array of rows, each containing an array of column values. No quotes or funny chars involved, i.e., no tabs or returns within individual "cells" just straight up numbers, letters, hyphen, underscore, space. Old-school version is nested listToArray() calls. Is there a slicker and/or faster way?
    t
    a
    • 3
    • 6
  • d

    Dave Merrill

    12/16/2022, 1:47 PM
    What version of ACF introduced the includeEmptyFields argument to listToArray(). Where should I have looked for that info?
    a
    d
    +4
    • 7
    • 17
  • u

    Umair Khan

    12/16/2022, 6:02 PM
    Hi Folks! While doing substring search I am facing issue when substring contains or keyword in it then it return false result Any work around for it?
    👀 1
    d
    c
    • 3
    • 18
  • p

    pmascaricfml

    12/16/2022, 8:12 PM
    Folks, Hoping for some help trying to decrypt a AES-GCM encrypted JSON object sent via HTTP Header. I am far from an encryption expert. Here are the instructions I have: "The value of the header contains a base64-encoded string that includes the initialization vector, additional authentication data, the cipher text itself, and an authentication tag which are used as inputs for the decryption process. The header also includes the length of each input in bytes:
    [ivLength: 1 byte][iv][aadLength: 2 bytes][aad][cipherTextLength: 4 bytes][cipherText][tag: 16 bytes]
    Thus, to parse the initialization vector (iv), you would read the first byte of the sequence to get its length. Then, you would read the next n bytes in the sequence to get the actual value of iv. To get the aad, you would read the 2 bytes following the iv to get its length, and then the next m bytes in the sequence to get the aad value. The tag at the end of the sequence has a predetermined length of 16 bytes, so its length is not included." I have had many stops and starts but I am having all kinds of trouble figuring this out. I've poured over many articles from Ben Nadel and others. Here's one of many of my several tries... Hoping someone can point me in the right direction. I have no idea if I'm on the right path or not, but the "aad" errors saying the array is out of bounds.
    Copy code
    <cfset context = myEncryptedString>
    
    			<cfset contextByte = createObject("Java", "java.lang.String").init(JavaCast("string", context).getBytes())>
    
    			<cfset b64 = createObject("Java", "org.apache.commons.codec.binary.Base64").init().decodeBase64(contextByte)>
    
    			<cfset in = createObject("Java", "java.io.ByteArrayInputStream").init(b64)>
    
    <cfset strt = 1>
    			<!---  parse the initialization vector (iv), you would read the first byte of the sequence to get its length --->
    			<cfset test = binarySlice( b64, strt, 1 )>
    			<cfset ivLength = createObject("Java", "java.io.ByteArrayInputStream").init(test).read()>
    			<cfdump var="#ivLength#" label="ivLength"><br><hr> 
    
    			<!--- Then, you would read the next n bytes in the sequence to get the actual value of iv --->
    			<cfset strt = 2>
    			<cfset iv = binarySlice( b64, strt, ivLength)>
    			<cfset iv = createObject("Java", "java.io.ByteArrayInputStream").init(iv).read()>
    			<cfdump var="#iv#" label="iv"><br><hr>
    
    			<!--- To get the aad, you would read the 2 bytes following the iv to get its length --->
    			<cfset strt = 3+iv>
    			<cfset aadlen = binarySlice( b64, strt, 2)>
    			<cfset aadlen = createObject("Java", "java.io.ByteArrayInputStream").init(aadlen).read()>
    			<cfdump var="#aadlen#" label="aadlen"><br><hr>
    			
    			<!---  then the next m bytes in the sequence to get the aad value --->
    			<!--- <cfset strt = strt+2>
    			<cfset aad = binarySlice( b64, strt, aadlen)>
    			<cfset aad = createObject("Java", "java.io.ByteArrayInputStream").init(aad).read()>
    			<cfdump var="#aad#" label="aad"><br><hr> --->
    
    			<!---  tag at the end of the sequence has a predetermined length of 16 bytes, so its length is not included --->
    
    <!--- Thanks, Ben! --->
    <cfscript>
    public binary function binarySlice(
    		required binary input,
    		required numeric index,
    		numeric length = 0
    		) {
    		var result = length
    			? arraySlice( input, index, length )
    			: arraySlice( input, index )
    		;
    		return( javaCast( "byte[]", result ) );
    	}
    </cfscript>
    p
    • 2
    • 1
  • j

    johnbarrett

    12/16/2022, 11:45 PM
    Does anybody know how to start ColdFusion on Windows 11? I just installed ColdFusion 2021 on windows 11, but it's not running now. I tried in vs code with ColdFusion Builder, but I get an error.
    b
    s
    • 3
    • 5
  • m

    Mauro caresimo

    12/19/2022, 12:22 PM
    I'm trying to test a malicious link through the browser and I need to check CF logs to see how it has been dealt with - Can anyone know which CF log I need to go into and check this? Cross Site scripting is on but when i do a global search for the malicious url I don't see the request logged anywhere. How can I tell if I cant see it in logs if Cross Site Scripting enabled has worked ??
    a
    s
    z
    • 4
    • 20
  • p

    pmascaricfml

    12/19/2022, 7:45 PM
    Can anyone help with how I would initialize an empty Java byte array in ColdFusion? For instance:
    byte[] values = new byte[5];
    I realize I can do something like this
    values = javaCast("byte[]", [ 83, 65, 82, 65, 72 ]);
    But I need to initial byte array to be empty?
    t
    p
    +3
    • 6
    • 16
  • g

    gus_dancy

    12/19/2022, 10:17 PM
    So I have this data in a column, obviously it has some carriage return line feeds in it. I can't figure out how to change the delimiters to "|". Administrative Staff Assistants Hygienists Dental Students Guests Dentists
    d
    m
    • 3
    • 9
  • p

    phillipsenn

    12/20/2022, 9:18 PM
    Help! I have a client that is supplying me with a bunch of pdf files. I need to put a unique serial number on each one. Can I use cfdocument or cfpdf to do that?
    b
    c
    +2
    • 5
    • 14
  • p

    phillipsenn

    12/20/2022, 9:19 PM
    merge just appends. What I need to do is more like an overlay instead.
  • p

    phillipsenn

    12/20/2022, 9:21 PM
    <*cfpdf* action="addStamp" looks promising.
  • r

    rawk

    12/20/2022, 11:00 PM
    General question: If I wanted to cache objects in the application scope, and return them as an array, is it better to store them as a struct (keyed by object ID) for fast subset retrieval? Or is it better to store the cache as an array for faster return of all objects? I guess the answer depends on which retrieval operation (all vs some) performed more often?
    z
    d
    • 3
    • 3
  • g

    gavinbaumanis

    12/21/2022, 9:43 AM
    Hi everyone, This isn't strictly a CFML question... It might be "JUST" an SQL problem - but since I can't solve it for myself in SQL, I'm open to solutions that may need some massaging in CFML, to get it working. Basically I need to create a join between two tables, where one side of the join is a column name, not a value in a column. I have created a dbFiddle to better explain. (I don't think I need a "coded" solution. A psuedo-code / steps required - will most likely be all I need) As always - thanks in advance for any ideas you might have.
    m
    l
    +2
    • 5
    • 8
  • m

    Minh Nguyen

    12/21/2022, 11:24 AM
    Can you add MSSQL server @gavinbaumanis? I am working on that.
  • z

    zackster

    12/21/2022, 6:38 PM
    ORM fans, does anyone know if ACF auto closes ORMsessions at the end of a request / thread / pageContext ? https://luceeserver.atlassian.net/browse/LDEV-4339
    • 1
    • 1
  • t

    Tyler Clendenin

    12/22/2022, 2:10 AM
    When using coldfusion enterprise on linux after creating an instance, what is the best way to run that instance as a service? add a new systemd service file for it?
    d
    • 2
    • 2
  • d

    Dave Merrill

    12/22/2022, 7:12 PM
    What's the best way in ACF2021 to detect if an array element has been set? For instance:
    Copy code
    a = [];
    a[2] = "asdf";
    b
    m
    +2
    • 5
    • 42
  • j

    John Liljegren

    12/22/2022, 8:02 PM
    does anyone have any experience with SAML SP signing in CF? I've seen certs come up as having an invalid policy if they were generated via the Add SP button in CF Admin.
  • s

    Scott Steinbeck

    12/23/2022, 12:25 AM
    how do we achieve this for a cfhttp call
    Copy code
    basicAuth = require('btoa')(authConfig.clientId + ':' + authConfig.clientSecret);
    ....
    headers: {
            'Accept': 'application/json',
            'Authorization': 'Basic ' + basicAuth,
            'Content-Type' : 'application/x-www-form-urlencoded'
          },
    is it just doing a
    base64
    and adding an authorization header. or does this get done automatically if we use the
    username
    and
    password
    args?
    b
    • 2
    • 1
  • g

    gsr

    12/23/2022, 1:10 PM
    i am getting a java heap space issues on my server, i have minimum of 512 and maximum of 2048 in my cfadmin and here is my jvm arguments
    Copy code
    java.args=-server  -Xms512m -Xmx2048m --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED -XX:+UseParallelGC -Djdk.attach.allowAttachSelf=true -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Dtika.config=tika-config.xml -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu -Dcom.sun.media.jai.disableMediaLib=true -Dcoldfusion.datemask.useDasdayofmonth=true -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib/,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/bin/cf-osgicli.jar
    
    # Comma separated list of shared library path
    java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international
    
    # Comma separated list of shared library path for non-windows
    java.nixlibrary.path={application.home}/lib
    
    java.class.path=
    i aqm still confused why it ends up in heap, is there a way how i can check what is going on,
    s
    • 2
    • 2
  • g

    gavinbaumanis

    12/23/2022, 3:16 PM
    Hi Everyone - I could do with some help with a regular expression, PLEASE. After getting some help with doing a join for my SQL - I am now up to manipulating the original string and inserting the syntax I was helped with - which I was planning to do with RegEx. I need to do a search and replace on all column names that have "_response" somewhere / anywhere in them. I have a sample at regex101 I have been playing with it for about an hour now. I am aware that I will probably need to use a group for the words that start with "x." and an extra group (at least one) for the rest of the matches. (\bx\..?_response.?\b,|SOMETHINGHERE) Because the SQL is dynamically created I have no idea what the start of the word might be, or the end. Sometimes the column ends in "_response," - just like the first line in the fiddle. But other times it could be "AAA_response" or "BBB_response_CCC". In the fiddle they all end with "_reason" - but that is just lazy typing and not to be relied upon. Thanks - again!
    a
    • 2
    • 8
  • j

    johnbarrett

    12/23/2022, 11:37 PM
    The Hawaii ColdFusion User Group is looking for a speaker to talk about an, "Introduction to API's" in ColdFusion for the January meeting. Please get a hold of me if you are interested in giving the talk.
  • d

    Daniel Mejia

    12/24/2022, 10:06 AM
    Merry Christmas, Happy Holidays, be safe out there and have fun this weekend!
    🎄 8
    simple smile 1
1...242526...38Latest