473,788 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

register_global s=on question

I know that having register_global s=ON is a security risk and we have it OFF.

We want to use the GeekLog content manager and it only works with ON.

Can someone give us some coding tips on how to mitigate any possible security
problems if we turn it on? I know it has to do with a querystring that is
same as a variable name being sent in the URL. How can we prevent that and
still leave globals ON? Anyone have some simple magic?

Thanks,

Al

Jul 16 '05 #1
3 2182
With total disregard for any kind of safety measures "Adams-Blake
Co." <at************ @adams.takeme.o ut.-blake.com> leapt forth and
uttered:
I know that having register_global s=ON is a security risk and we
have it OFF.

We want to use the GeekLog content manager and it only works
with ON.

Can someone give us some coding tips on how to mitigate any
possible security problems if we turn it on? I know it has to do
with a querystring that is same as a variable name being sent in
the URL. How can we prevent that and still leave globals ON?
Anyone have some simple magic?

Thanks,

Al


rm ./geeklog -r

Thats the only sure way.

What is geeklog anyway? Have you looked into something else like
Plog? (http://plog.sourceforge.net)

--
There is no signature.....
Jul 16 '05 #2
sam
What php version are you using?

If your php version is >= 4.1.0
Then add:

import_request_ variables('GPC' );

in the header of the file.
This will imports GET/POST/COOKIE in the global scope.

If you want to import other variables like SERVER
use the function extract().

DO NOT touch your php.ini file!
HTH


"Adams-Blake Co." <at************ @adams.takeme.o ut.-blake.com> wrote in
message news:ID******** ********@newsre ad4.news.pas.ea rthlink.net...
I know that having register_global s=ON is a security risk and we have it OFF.
We want to use the GeekLog content manager and it only works with ON.

Can someone give us some coding tips on how to mitigate any possible security problems if we turn it on? I know it has to do with a querystring that is
same as a variable name being sent in the URL. How can we prevent that and
still leave globals ON? Anyone have some simple magic?

Thanks,

Al

Jul 16 '05 #3
"sam" <rb*****@carama il.com> schrieb:
If your php version is >= 4.1.0
Then add:

import_request_ variables('GPC' );

in the header of the file.
This will imports GET/POST/COOKIE in the global scope.


This is nearly the same as to use register_global s = on.

Regards,
Matthias
Jul 16 '05 #4

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

Similar topics

4
12462
by: Frank | last post by:
Whats best : register_globals ON ? OR register_globals OFF ? I currently use: $_POST
1
1808
by: Useko Netsumi | last post by:
That is the question. Perhaps some of the guru can tell us why is this such a big deal. In fact, with the register_globals=On makes things easiers - Most of the old code/example/tutorial will run.
1
1576
by: News | last post by:
All, I have some code that works just fine when register_globals is on, however, for obvious reasons, I am trying to rework the code so that I can disable register_globals. I have set my error_reporting to E_ALL, and am logging it to a file so that I can review it. Are there any "steps" to take in successfully updating the code ? Or do I just run each and every page looking for errors ?
3
1697
by: Andrea A | last post by:
Is it possible to set Register Globals on or off depending on the virtual directory of apache in which PHP is running? Is it possible using only one php.ini? Thanks, A
6
2518
by: wonder | last post by:
Hi, The CRM application said that need to add an option "REGISTER_GLOBALS=On" to the php.ini file, so I did what it told. But I still can't get rid off the following error: The PHP variable "REGISTER_GLOBALS" is disabled (0). This is fatal. Edit your php.ini and set REGISTER_GLOBALS to "On". I changed the value "On" to "Yes", still getting the same error.
12
3299
by: aeldaly | last post by:
Hello all, My shared server provider has register_globals on. I checked by running php_info(); from within a file. I would like to turn this off, but asking them to turn it off just for me will not work. I tried adding the following lines to the .htaccess file: <IfModule mod_php4.c> php_flag register_globals off </IfModule>
2
1463
by: peter | last post by:
I have been unsuccessful turning register_globals off. I've tried several ideas. I'm thinking it may not be possible with my hosting company. If I initialize all variables, using $_POST, does that make my script relatively secure? Thanks, Peter
4
1541
by: bnashenas1984 | last post by:
Hi everyone I'v been working on my scripts more that 5 months using Microfoft IIS on windows XP. As default the ( register_globals ) was ON ( php.ini ) and that means I didnt need to use ( $_request ) to get the variables from URL. I bought a webspace for 2 weeks ago and realized that ( register_globals ) is turned off on the server. I contacted the support center but they said its not possible for them to turn it on ( because of some...
8
1795
by: +mrcakey | last post by:
I understand that register_globals was turned off by default as, unless you initialised it, it could be altered by a malicious coder. What I don't understand is how the $_POST form is any more secure. Surely Mr Malicious Coder can still just send his own version of $_POST? Obviously I'm missing something, I just can't figure out what! +mrcakey
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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
10366
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10175
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...
0
9969
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
8993
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...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
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.