This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| checkFields = ["test1", "test2"] | |
| temp = hashasSuspiciousInput(checkFields); | |
| writeoutput(temp); | |
| public boolean function hasSuspiciousInput( required array checkFields ) { | |
| var suspiciousInput = false; | |
| var sqlPatterns = getSQLInjecionPatterns(); | |
| cfloop( array=arguments.checkFields, index="fieldValue" ){ | |
| if( fieldValue.trim().len() > 0 ) { | |
| cfloop( array=sqlPatterns, index="pattern" ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| checkFields = ["test1", "test2"] | |
| temp = hashasSuspiciousInput(checkFields); | |
| public boolean function hasSuspiciousInput( required array checkFields ) { | |
| var suspiciousInput = false; | |
| var sqlPatterns = getSQLInjecionPatterns(); | |
| cfloop( array=arguments.checkFields, index="fieldValue" ){ | |
| if( fieldValue.trim().len() > 0 ) { | |
| cfloop( array=sqlPatterns, index="pattern" ){ | |
| if( reFindNoCase(pattern, fieldValue) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| checkFields = ["test1", "test2"] | |
| temp = hashasSuspiciousInput(); | |
| public boolean function hasSuspiciousInput( required array checkFields ) { | |
| var suspiciousInput = false; | |
| var sqlPatterns = getSQLInjecionPatterns(); | |
| cfloop( array=arguments.checkFields, index="fieldValue" ){ | |
| if( fieldValue.trim().len() > 0 ) { | |
| cfloop( array=sqlPatterns, index="pattern" ){ | |
| if( reFindNoCase(pattern, fieldValue) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfjava handle = "instance"> | |
| public class Car{ | |
| public String model; | |
| public int year; | |
| public Car(String carModel, int carYear){ | |
| this.model = carModel; | |
| this.year = carYear; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfjava handle = "instance"> | |
| public class car{ | |
| public String model; | |
| public int year; | |
| public car(String carModel, int carYear){ | |
| this.model = carModel; | |
| this.year = carYear; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| //query | |
| myQuery = queryNew("id,name,amount,revenue","Integer,Varchar,Integer,Integer", | |
| [ | |
| {id=1,name="One",amount=15,revenue=35}, | |
| {id=2,name=JavaCast("null", ""),amount=18,revenue=41}, | |
| {id=3,name="Three",amount=32,revenue=73} | |
| ]); | |
| writeOutput("The new query is:"); | |
| writeDump(myQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset dt = ParseDateTime('2026-02-02', 'yyyy-mm-dd')> | |
| <cfset res = dateCompare(dt, '2026-02-02', 'd')> | |
| <Cfoutput>#res#</Cfoutput> | |
| <cfif res gt 0> | |
| <Cfoutput>hola</Cfoutput> | |
| </cfif> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset dt = ParseDateTime('2026/02/02', 'yyyy-mm-dd')> | |
| <cfset dateCompare(dt, now(), 'd')> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfset dt = ParseDateTime('2026/02/02', 'yyyy-mm-dd')> | |
| <cfset dateCompare(dt, now(), 'd') lte 0 > | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| dateCompare(dt, now(), 'd') lte 0 | |
| </cfscript> |
NewerOlder