close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Security Assist redirect

Thread began 2/04/2013 2:29 pm by john70964 | Last modified 2/06/2013 4:11 am by john70964 | 541 views | 8 replies |

john70964

Security Assist redirect

I have a directory with a
menu.php page which links to a Search Page
also a
Results Page and an
Update page

For administration purposes.
When any of the above pages are used without going via a login page the user is redirected to a Login page.
I want the Login Page to redirect to the MenuPage.
In the box
"If login Succeeds, go to" I have this set to menu.php

If open the results page first it redirects me to the login page. OK

When I login I am directed to the results page and not the menu page.

I am attaching the login page and the results page. Perhaps someone can see what may be incorrect here?
Many thanks
John

Sign in to reply to this post

DarylBeta Tester

Im not sure if this will help, but I would suggest to try going to the behaviours panel when login.php is open, open the SecurityAssist Authenticate User behaviour and ensure that the redirect option is unticked in the Redirect section for 'Go to previous URL (if it exists) and see if that helps.

Sign in to reply to this post

john70964

Thanks Daryl
Yes both of the tick boxes are unticked.

Sign in to reply to this post

DarylBeta Tester

Hmm, I will leave this one to Jason then...

This code on login.php

"successRedirect" => "../Consul/menu.php",
"failRedirect" => "loginfailed.php",
"gotoPreviousURL" => FALSE,
"keepQueryString" => FALSE



Says that if you login correctly you should go to "../Consul/menu.php" and if you fail your login you should go to "loginfailed.php". It shouldnt remember your previous URL (gotoPreviousURL" => FALSE) or Query String (keepQueryString" => FALSE)

The code on update_results

if (!WA_Auth_RulePasses("Logged in to users")){
WA_Auth_RestrictAccess("../Login/loginfailed.php");



says that if you are not logged in, you will get sent to "../Login/loginfailed.php"

Sign in to reply to this post

john70964

Thanks again Daryl

All helps in the learning of.

John

Sign in to reply to this post

Jason ByrnesWebAssist

in the webassist/security_assist/heler_php.php file, change lines 51-53:

php:
if (isset($_GET['accesscheck'])) {

            $WA_Auth_Parameter["successRedirect"] = urldecode($_GET['accesscheck']);
        }



to:

php:
if (isset($_GET['accesscheck']) && $WA_Auth_Parameter["gotoPreviousURL"]) {

            $WA_Auth_Parameter["successRedirect"] = urldecode($_GET['accesscheck']);
        }
Sign in to reply to this post

john70964

Thanks Jason
That code change seems to have sorted out the problem.
I have placed the files on the server and it throws up an error as follows:
Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Login/login.php:11) in /home/username/boat-for-sale.co.uk/Login/login.php on line 76

Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Login/login.php:11) in /home/username/boat-for-sale.co.uk/Login/login.php on line 81

Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Login/login.php:11) in /home/username/boat-for-sale.co.uk/Login/login.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Login/login.php:11) in /home/username/boat-for-sale.co.uk/Login/login.php on line 101

Warning: Cannot modify header information - headers already sent by (output started at /home/username/boat-for-sale.co.uk/Login/login.php:11) in /home/username/boat-for-sale.co.uk/webassist/security_assist/helper_php.php on line 56

Sounds rather like the error I had earlier with the UEMail.

I have zipped and attached the file and hope you may be able to see the problem.
Many thanks
john

Sign in to reply to this post

Jason ByrnesWebAssist

change line 9 - 11:

php:
?>

<![CDATA[@@OldIncludeCode@@]]>
<?php




to:

php:
?>

<?php
Sign in to reply to this post

john70964

Thanks Jason
Worked very well
Regards
John

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