close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

apostrophe breaking validation

Thread began 7/30/2019 9:42 am by Jamie | Last modified 8/08/2019 8:39 am by Ray Borduin | 554 views | 6 replies |

Jamie

apostrophe breaking validation

Hey Ray

Have got a server validation

$WAFV_Errors .= WAValidateAN(((isset($_FILES["EventImage"]))?$_FILES["EventImage"]["name"]:"") . "",true,true,true,false,"-_.",false,2);

It works fine until you have a filename with ' in it somewhere and then it shows an internal server error (http://prntscr.com/om334m) rather than going back to the update page and showing the validation error message.

Have attached a page, but this is happening on all inserts and update pages

Sign in to reply to this post

Ray BorduinWebAssist

It probably isn't breaking the validation... it is probably breaking the file upload. Windows doesn't allow files to have quotes in them, so I can't even create one to test with until I get back to my MAC.

I'd maybe use regular expression validation instead and only allow numbers, letters, and the period for the extension. I think the issue is that alphanumeric validation is for validation on sentences or paragraphs and it allows things like single quotes which shouldn't be in file names.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

ok thanks for that Ray and certainly interesting.

I have tried setting the validation up this way

$WAFV_Errors .= WAValidateRX(((isset($_FILES["EventImage"]))? preg_replace('/.[^.]*$/', '', $_FILES["EventImage"]["name"]) :"") . "","^[a-zA-Z0-9_.-]+$",true,2);



to only allow alphanumeric, underscore, hyphen and period and still getting the internal server error http://prntscr.com/onmb1e - if I rename the file to have spaces but no apostrophe then the validation works fine

Sign in to reply to this post

Ray BorduinWebAssist

Can I get FTP access and steps to reproduce... maybe even attach the file you are uploading so I can test with that.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

sure, see PM

Sign in to reply to this post

Ray BorduinWebAssist

The FTP information I have doesn't seem to work. Please attach an updated site definition so I can test the issue and I'll get it sorted.

Sign in to reply to this post
Did this help? Tips are appreciated...

Jamie

as per chat last night, this is a mod_security rule and is unchangeable.

Thanks for helping :)

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...