Solved

CGI/SSI and security

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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

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.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

696 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