PHP Simplicity Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The latest version of Simplicity oF Upload is 1.3.2.

Author Topic: Protect upload page from unorthorised users ?  (Read 4833 times)

0 Members and 1 Guest are viewing this topic.

Bonzo

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
    • View Profile
Protect upload page from unorthorised users ?
« on: June 07, 2004, 05:25:43 PM »

I am rebuilding my website and am getting close to finishing.

The website uses php includes so I thought I would just .htaccess the folder SFU was in and that would be that.

But it dose not work; do you have a simple fix or will I have to implament some other login code ?

Its working great so far although I have not altered the code as you suggested in my other post.

Anthony

www.rubble.info - is the site under photos - upload photos
« Last Edit: June 08, 2004, 03:33:17 PM by Bonzo »
Logged
Beer is Best

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Protect upload page from unorthorised users ?
« Reply #1 on: June 08, 2004, 03:54:35 AM »

I was thinking about that issue..
and don't worry, I am almost finished with a simple auth system that can protect anypage you want :)

but however, if you want to allow users to register, I suggest looking for an advanced sysetm ,since mine will be very simple and will allow the adminstartor to add accounts manually only!
the name is Simple Auth and it's almost finished ;)


btw, I've noticed you've allowed script formatting! which caused duplication of <html><head><body> tags! you may want to disable script formatting to off
look what you currently have:
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Anthony, Jane & Katies family website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel='stylesheet' href='layoutw.css' type='text/css'></head>
<body>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td id="toprow">
    <h1>Anthony, Jane & Katie's website</h1>
<div class="button"><a href="index.php?inc=cont">Contact</a></div><div class="button"><a href="index.php">Home</a></div><div class="button"><a href="index.php?inc=info">Information</a></div><div class="button"><a href="index.php?inc=photo">Photos</a></div><div class="button"><a href="index.php?inc=vid">Videos</a></div><div class ='button'>
        <a href='index.php?inc=photo1'>View photos</a>
        <a href='index.php?inc=photo2'>Upload photos</a>
        </div>

      </td>
    </tr>
    <tr>
      <td id="maincontent">
<div class="pagetext">

HERE HERE HERE
<HTML>
           <HEAD>
              <TITLE>Simplicity oF Upload 1.0</TITLE>
              <STYLE type="text/CSS">
                <!--
                body {
                    font-family: Tahoma, verdana; font-size: 12px;
                }
                p.header {
                    font-family: Tahoma, verdana; font-size: 18px;
                }
                a:link, a:visited {
                color: #009999; text-decoration:none;
                }
                a:active {
                color: #FF6600; text-decoration:none;
                }
                -->
              </STYLE>
            </HEAD>
            <BODY>
HERE HERE HERE
            <p align="center" class="header">Simplicity oF Upload 1.0 Beta 4</p><p align="center">
            <form method="POST" enctype="multipart/form-data" action="/index.php?inc=photo2"><input type="file" name="SFUfile[]" size="20" /><br />
<input type="file" name="SFUfile[]" size="20" /><br />
« Last Edit: June 08, 2004, 08:26:37 AM by Saleh »
Logged

We don't need a reason to help people

Bonzo

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Protect upload page from unorthorised users ?
« Reply #2 on: June 08, 2004, 03:32:57 PM »

Config file ? what config file !

My moto " If all else fails read the instructions "  :-[

I had not even seen that and as it worked I had not looked for anything else but altered now; thanks for the instruction.

I was thinking about this security / login business after I posted the above last night. It is very anoying that you can not seem to use the same loging for different codes. As if I have a login for this then one for a forum etc. The user may have to login two or three times when accessing the site.

Not anything to do with your scripts but just a general observation. May be an opertunity here if someone with some "muscle" where to implement something.

Anthony
Logged
Beer is Best

Bonzo

  • Newbie
  • *
  • Offline Offline
  • Posts: 6
    • View Profile
Re: Protect upload page from unorthorised users ?
« Reply #3 on: June 08, 2004, 03:48:06 PM »

I ment to add - An access control controled by the site admin was what I was after, as in this case I will be the only one to allow anyone to have access to this area.

Anthony
Logged
Beer is Best

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Protect upload page from unorthorised users ?
« Reply #4 on: June 09, 2004, 06:05:13 AM »

Quote
I was thinking about this security / login business after I posted the above last night. It is very anoying that you can not seem to use the same loging for different codes. As if I have a login for this then one for a forum etc. The user may have to login two or three times when accessing the site.

Not anything to do with your scripts but just a general observation. May be an opertunity here if someone with some "muscle" where to implement something.
that's where the idea of Portals and CMS came to this world :D
however, you can unify the logging parts of each script but it wouldn't be easy :P
Logged

We don't need a reason to help people

smack

  • Newbie
  • *
  • Offline Offline
  • Posts: 4
    • View Profile
    • Air Warrior Online
Re: Protect upload page from unorthorised users ?
« Reply #5 on: May 11, 2005, 09:36:13 AM »

If you use a forum like SMF and would like to use the forum auth system you can use something like this.

Code: [Select]
<? include "forum/SSI.php"; ?>
<html>
<head>
<title>My Site</title>
</head>
<body>

<? include "header.php"; ?>

            <?
            if ($context['user']['is_guest'])
            {
            echo
            '<h5>Access Denied</h5>
            <div align="center">
            <table width="75%" bgcolor="#FFFFCC"><tr><td>We are sorry guest, it seems you dont have premission to download this files. <a href="forum/index.php?action=register">Click Here</a> to become a register member</tr></td></table></div>';
            }
            else
            {
            echo '<br><br>';
            include ('simpledownload.php');
            }

            ?>

<? include "footer.php"; ?>

</body>
</html>

I think that would use the SMF registration options for the page you include your download script.
« Last Edit: May 11, 2005, 09:41:01 AM by smack »
Logged
WAS UP DUDE!
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Are you a bot/spammer?: