Solved

CGI/SSI and security

Posted on 1998-02-16
2
226 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 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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
exchange ,script 10 69
Select String - If Else Statement - Powershell 8 43
powershell automatic variable for results 21 39
Writing reports to a script 7 26
Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

732 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