?
Solved

CGI/SSI and security

Posted on 1998-02-16
2
Medium Priority
?
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
anguslai earned 300 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Suggested Courses

801 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