Solved

CGI/SSI and security

Posted on 1998-02-16
2
223 Views
Last Modified: 2013-12-25
Hi

I'm trying to prevent users from seeing a certain part of the web site.  (That part I can do.)  What I want to do next is to use a CGI script to check the IP number of the user and see if he may access the restricted area or not.  (That part I can do as well.)  The third part I'm having trouble with.

I want a SSI to use the returned value from the CGI script (either a yes or a no) and then, using XSSI, display a button to that section (if allowed) or don't display anything at all (if not allowed).  I'm unable to use the return value in any further SSI action.  Any help???

What I don't really want to do (but have to untill another solution comes up) is to have the CGI script generate the complete page.

Thanks
0
Comment
Question by:cfm
2 Comments
 
LVL 2

Accepted Solution

by:
anguslai earned 100 total points
ID: 1831994
SSI Work only if the server directly return html page to browser.

In your case, your form value is either "Yes" or "No", then you can do the following:
1) create 2 html pages, one for "Yes" and one for "No" .
2) In your CGI :
    If value=Yes then
       print Location:Yes.html\n\n
    else
       print Location:No.html\n\n

Hope you happy with this answer!


0
 

Author Comment

by:cfm
ID: 1831995
Not the answer I was looking for, but if that is a restriction of SSI, then I must just life with it.

I already implemented that solution.  Was hoping something else is possible.

C
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Building Windows 10 1 84
Google  (Get  Users Email) 2 136
Need sample Angular apps for study 4 102
List all Printers with anmes and Ip address 3 28
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The viewer will learn how to count occurrences of each item in an array.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question