473,775 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

status on Homepage

hi ng.

I want to integrate a status on my (business) Homepage

It should look like:

Right now we're in the shop
... are closed.

(.. we have different working hours between saison)
the status is in a text-file status.txt
1 or 0

I will change the status like:
http://www..../status/changestatus.php?on
http://www..../status/changestatus.php?off

is there a security-issue because i have to set the status file writeable

how can i prevent someone else changing it
thanks

Armin Horner
Nov 30 '07 #1
6 1411
I will change the status like:
http://www..../status/changestatus.php?on
http://www..../status/changestatus.php?off

is there a security-issue because i have to set the status file writeable

how can i prevent someone else changing it
By password-protecting the status directory, if if not also used to
query the status. You usually do this in the webserver.

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Nov 30 '07 #2
I want to integrate a status on my (business) Homepage
Then - honestly - you should consider giving this task to someone who knows
what he does.
Nov 30 '07 #3
Armin Horner wrote:
hi ng.

I want to integrate a status on my (business) Homepage

It should look like:

Right now we're in the shop
.. are closed.

(.. we have different working hours between saison)
the status is in a text-file status.txt
1 or 0

I will change the status like:
http://www..../status/changestatus.php?on
http://www..../status/changestatus.php?off

is there a security-issue because i have to set the status file
writeable

how can i prevent someone else changing it
First of all, make sure the status.txt file is in a directory that's
inaccessible from the web (ie. only accessible via your scripts),
preferably one step below the webroot, although not required.

On all my PHP projects, I create a seperate directory called "inc" in
the webroot (or the root directory of my project). If Apache is used, I
place a .htaccess file containing the keyword "deny from all" in it.
Or, if IIS is used (which has happened on a rare occasion), I make sure
all outside access is denied for this directory from the IIS manager.
That way, I protect my code (as well as the base configuration) from
being exposed and/or accessed directly.

Second, make sure your changestatus.ph p script ONLY reacts to the "on"
or "off" keywords. Or any other keyword you'd like to use instead (such
as "open" or "closed").

Further, to avoid someone outside your organization from setting the
status (such as opening the URL and making it look like you're closed
when you're open for business or vice-versa), you should place this
script under some sort of password protection (either via your CMS or
via a simple basic authentication method).

--
Kim André Akerø
- ki******@NOSPAM betadome.com
(remove NOSPAM to contact me directly)
Nov 30 '07 #4
Kim André Akerø schrieb:
>
First of all, make sure the status.txt file is in a directory that's
inaccessible from the web (ie. only accessible via your scripts),
preferably one step below the webroot, although not required.
... it is, ok.
>
On all my PHP projects, I create a seperate directory called "inc" in
the webroot (or the root directory of my project). If Apache is used, I
place a .htaccess file containing the keyword "deny from all" in it.
... i'll use htaccess
Or, if IIS is used (which has happened on a rare occasion), I make sure
all outside access is denied for this directory from the IIS manager.
That way, I protect my code (as well as the base configuration) from
being exposed and/or accessed directly.

Second, make sure your changestatus.ph p script ONLY reacts to the "on"
or "off" keywords. Or any other keyword you'd like to use instead (such
as "open" or "closed").

Further, to avoid someone outside your organization from setting the
status (such as opening the URL and making it look like you're closed
when you're open for business or vice-versa), you should place this
script under some sort of password protection (either via your CMS or
via a simple basic authentication method).
i'll protect it with a weird name and keywords so nobody switches on and
off.

thanks for help
(.. been a long time ago since i last used php so this is very helpful)

Armin
Nov 30 '07 #5
Armin Horner wrote:
Kim André Akerø schrieb:
>>
First of all, make sure the status.txt file is in a directory that's
inaccessible from the web (ie. only accessible via your scripts),
preferably one step below the webroot, although not required.
.. it is, ok.
>>
On all my PHP projects, I create a seperate directory called "inc" in
the webroot (or the root directory of my project). If Apache is used, I
place a .htaccess file containing the keyword "deny from all" in it.
.. i'll use htaccess
>Or, if IIS is used (which has happened on a rare occasion), I make sure
all outside access is denied for this directory from the IIS manager.
That way, I protect my code (as well as the base configuration) from
being exposed and/or accessed directly.

Second, make sure your changestatus.ph p script ONLY reacts to the "on"
or "off" keywords. Or any other keyword you'd like to use instead (such
as "open" or "closed").

Further, to avoid someone outside your organization from setting the
status (such as opening the URL and making it look like you're closed
when you're open for business or vice-versa), you should place this
script under some sort of password protection (either via your CMS or
via a simple basic authentication method).

i'll protect it with a weird name and keywords so nobody switches on and
off.

thanks for help
(.. been a long time ago since i last used php so this is very helpful)

Armin
Armin,

Don't. Obfustication is not security! It's only the illusion of security.

Follow the suggestions others gave you.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ==
Nov 30 '07 #6
Jerry Stuckle schrieb:
>>
i'll protect it with a weird name and keywords so nobody switches on
and off.

thanks for help
(.. been a long time ago since i last used php so this is very helpful)

Armin

Armin,

Don't. Obfustication is not security! It's only the illusion of security.

Follow the suggestions others gave you.
your true!

i will use a password-form if it is a problem
(someone switches)

thanks

Armin
Dec 1 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1745
by: Mark Constant | last post by:
I was doing a test website where on one page somebody could select a Genre from a drop-down list and it would display every sub-listing under that specific Genre. If the user selected All it would display everything. Now I have tried to implement it into my real homepage and I am having a little problem. Now not only do I pass the Genre to my XSLT but I pass the Hardware selection to the XSLT file. I get this error. "Expected token...
1
3368
by: rolear01 | last post by:
A php newbie with a problem! I have a form with a text area <form name=edit_front_page_form action="/test.php?page=front_page_updated" method=get> <p>Edit front page<br> <textarea cols=30 rows=15 name='text_front_page'></textarea> <input type=submit value="Submit"> </form>
2
2120
by: arbpen | last post by:
I find it superfluous to have a 'Make Us Your Homepage' link/script, but there it is, I have boss who wants it. Anyway, this is the snippet that is throwing an error: <li style="border:0"><a href="#st=100&amp;zip=18&amp;cities=18,19" onclick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.nextblock.com\');">Make nextBlock! my homepage</a></li> IE6 is reporting an error on line 426 character 21, invalid...
3
3205
by: bb nicole | last post by:
Below is my login function, it can work well, but after i include it at my homepage, the print message is in the login page... What should it do to make the print message invalid username or password and please enter you enter both username and password display in homepage, please help me... <?php ob_start(); session_start(); ?> <html> <head> <style type="text/css">
7
1962
by: patelxxx | last post by:
Guy's, On my homepage website I want to display the current status of our server. The idea I have is to ping (or send my ip address) to our server every 5 mins and the result I get back should result (and display on my homepage) in a success or failure of the server. Can someone please help me with the coding for this or just start me off? Many Thanks in advance. Regards
1
2103
by: Macneed | last post by:
I want to write a code to determine the homepage content was change, but if the homepage is write by asp or something else, (e.g. livescore.com here) i can't get the real homepage content by the following code, what can i do? if it is not related to c# which newsgroup should i post to? using System; using System.Net;
3
2033
by: svjames | last post by:
heya guyzorz, just a quick q, for the life of me i cant find a way to obtain the value of a users browsers default homepage. Ive written a site that provides access to the internet on a certain segment and once a user is logged in i want to forward them to thier own homepage in a new window. i tried window.open(window.home()) but to no avail, usually my attampts ended in a script working in IE and not MOZ or vice versa. i have developed a...
2
6978
by: pavi | last post by:
Anyone know how to set the Default homepage using javascript without prompting a pop up. Below is the code i used to set default home page. <a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http:// www.xyz.com');">set the homepage</a> The problem with this code is when i click the link it prompts me a
0
1815
by: hani1987 | last post by:
hello I am a BE computer student and needed information for my BE project. The project is as follows We are developing a web application for a company. This involves setting up a wi-fi hotpot for the company. So whenever a user enters the wi-fi area , he should be taken to the companies homepage or homepage of our web application irrespective of the webpage typed in his browser.After the 1st page is displayed, the user should be taken...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10107
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10048
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9916
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7464
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2853
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.