The syntax is…
listfindnocase(list, value, delimiters) while findnocase is…
findnocase(substring, string, start) (maybe you just got these backwards?)
CGI.script_name can’t be searched as a list because its not.
The error occurred in D:\hshome.…\Application.cfm: line 18
16 :
17 :
18 : <cfif not listFindNoCase(cgi.script_name, file, ‘/’)>
19 : <!— Run this code, including sending to request.self, or logging potential hack attempts —>
20 :
On line 17, you set the index to “file” and then in the very next line, line 18, you’re searching for a substring of #cgi.script_name# in string name “file.” I think you mean to do it the other way around.
First, I’d make you’re index called “i” instead of “file,” that sounds confusing. Secondly, since you’re in a loop I don’t see exactly why you’re using listfindnocase instead of just plain findnocase with listgetat…is that a required part of fusebox? Because of this (listfindnocase), you end up searching through the same list over and over again for the same term, for as many list items there are (in your loop). I can’t see all of your code, but from what I see, I’d redo it like this. note, I don’t know fusebox
16 :
17 :
18 : <cfif not FindNoCase(cgi.script_name, ListGetAt(directAccessFiles, i, ‘/’))>
19 : <!— Run this code, including sending to request.self, or logging potential hack attempts —>
20 :
Thats what I believe the corrected form of your code should look like…but I’m still kinda puzzled. You do know that CGI.script_name is gonna be static, so if its being checked against a list of other “script_names” its gonna trigger. Thats unless the list consists of one item, which matches up against your CGI.script_name. What you probably want to do is: 1. search for the CGI.script_name in the list of legitimate script_names 2. Record the hack attempt if the search result returns false. Just a guess, but have you just been copy/pasting code snippets from random stuf floating around? Looking at that code makes my mind wobble, still. No offense, I’m just confused about whats going on in the code.
So, I’m assuming you really want to do this…(notice no loop)
17 : <cfif listfindnocase(directAccessFiles, CGI.script_name, ‘/’)>
18 : <!— Run this code, including sending to request.self, or logging potential hack attempts —>
19 :