Solved

CGI/SSI and security

Posted on 1998-02-16
2
218 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
Comment Utility
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
Comment Utility
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 to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
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 …

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now