close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

XSS Scripting

Thread began 3/28/2019 8:37 am by Jamie | Last modified 4/04/2019 9:39 am by Ray Borduin | 813 views | 13 replies |

Jamie

XSS Scripting

Hey Ray

Have been contacted by someone from 'open bug bounty' - have looked into them and they seem legit? - but they have said that a site I have (in the PM) has a xss vuklnerability. They havent provided more details than that at this time.

Just wanted to ask if this was to do with the the action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>" in the contact form element and not requiring it filled in?

Or is it something else?

Cheers

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

Remove the action tag or set it to action="". That should fix it.

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

Jamie

Thanks very much. Is it only a contact form that I need to be looking at?

Sign in to reply to this post

Ray BorduinWebAssist

I would do a site-wide search for:
$_SERVER["PHP_SELF"]

and:
$_SERVER["QUERY_STRING"]

and make sure they aren't in an echo statement in the html anywhere.

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

Jamie

thanks Ray

couple of follow up questions on this

1. is replacing $_SERVER["PHP_SELF"] with $_SERVER["REQUEST_URI"] ok?

2. is this ok as <form id="form1" name="form1" method="post" action="users_login.php?failed=1<?php echo(isset($_SERVER["QUERY_STRING"])?"&".($_SERVER["QUERY_STRING"]):""); ?>" class="form-container formLogin">?

Sign in to reply to this post

Ray BorduinWebAssist

No. That will cause issues too. Even REQUEST_URI is dangerous. The form action should be changed to action="" if it posts to the same page it is on.

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

Jamie

ok thanks. another follow up is that I have navigation (attached) that uses a combination of both to select the on state depending on the page you're on - am I going to need to change this and how would I dynamically select the page/onstate ?

Sign in to reply to this post

Ray BorduinWebAssist

That doesn't need to be updated. You can check those values and use them in IF statements without issue. The issue occurs when they are written into the html, and that isn't done in this file.

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

Jamie

thanks for all your help on this. Have had a follow up, details in PM

Sign in to reply to this post

Ray BorduinWebAssist

It looks like there is a typo in the file: webassist/form_validations/wavt_validatedform_php.php

php:
if ($encoded) htmlspecialchars($retVal);



should be:

php:
if ($encoded) $retVal = htmlspecialchars($retVal);



I'll get it corrected in the next update.

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

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...