DirectoryExists issue on shared hosting

4 views
Skip to first unread message

Sumit Verma

unread,
Dec 22, 2011, 2:58:56 PM12/22/11
to ValidateThis-dev
Hey Guys,

As you know we are using ValidateThis on Slatwall and validation has
never been easier than this before! So, thanks for a great framework.

Some folks using Slatwall on shared hosting reported that
DirectoryExists() check in getAbsolutePath() method in FileSystem.cfc
line 79 throws permission error when relative path is specified. Here
is the code that fixes the issue.

<cftry>
           <cfset var dirExists = DirectoryExists(arguments.path) />
           <cfcatch type="security">
               <cfset var dirExists = false />
           </cfcatch>
       </cftry>
       <cfif not dirExists>

Can this be updated in core?

Thanks,
Sumit

Matt Quackenbush

unread,
Dec 22, 2011, 3:08:13 PM12/22/11
to validate...@googlegroups.com
Sumit,

Any chance you can clone the project and submit a pull request with the changes?

Also, I'm not sure what the changes are (you've only provided the "after" code, I think?), but is it safe to assume that you've run the test suite and they all pass?

Thanks!


--
You received this message because you are subscribed to the Google Groups "ValidateThis-dev" group.
To post to this group, send email to validate...@googlegroups.com.
To unsubscribe from this group, send email to validatethis-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/validatethis-dev?hl=en.


Bob Silverberg

unread,
Dec 22, 2011, 4:21:35 PM12/22/11
to validate...@googlegroups.com
Matt is correct that the preferred procedure is to do a pull request,
but I don't want to discourage contributions by requiring that of
folks who may not be up to speed on Git. Matt is also correct that
you should run VT's complete test suite after making a change to
ensure you haven't broken anything.

Please respond to this note, and if you don't have the time or
knowledge to do a pull request just let me know and I'll add this into
the code as it's a very small change.

Bob

--
Bob Silverberg
www.silverwareconsulting.com

Sumit Verma

unread,
Dec 22, 2011, 4:51:42 PM12/22/11
to validate...@googlegroups.com
Hi Bob,

If you can add this, that will be much appriciated. My hard disk died 2 days back, so, still working on getting the new laptop setup...

Thanks,
Sumit

Sumit Verma
Partner / Vice President | ten24, LLC
office: 877.886.5806 x 103 | mobile: 617.290.8214
www.ten24web.com | www.linkedin.com/in/sverma | twitter: blogonria

Greg Moser

unread,
Dec 22, 2011, 6:39:06 PM12/22/11
to validate...@googlegroups.com
Just as a follow up I submitted a pull request for this update:  https://github.com/ValidateThis/ValidateThis/pull/71

I ran MXUnit and there are 3 errors and 1 failure.  However these are the same 3 errors and 1 failure if I run MXUnit against the current develop branch.

-Greg
Reply all
Reply to author
Forward
0 new messages