Welcome to Geeklog, Anonymous Tuesday, April 30 2024 @ 02:04 am EDT

Geeklog Forums

Register Globals Question


RGQ

Anonymous
The Register Globals issue comes up a fair amount. I can do some basic to intermediate PHP coding and am wondering if I might help eliminate it.

What is required to recode Geeklog so that it runs with RG = off? If the holdup here is just a matter of going through the entire codebase and making a bunch of no-brainer changes, I am willing to do it and then organize a group of folks to test the changes.

Of course of the problem is very complex, then *ahem* nevermind.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
The thing is, it's not even documented as no one could predict it would be a problem (at least not documented in the PHP files themselves).

What you need to do is go through every PHP file and change two things:
1) Every "used to be global" parameter into a super global one.
2) Every "old style" super global into a "new style" super global.

The downside is that it can wreck havoc for people with old versions of PHP...then again, there always comes a time when people who don't update are left behind.

Maybe we can turn this topic into a list of such parameters. If anyone who reads this can think of anything, simply list it here.
Oh, and mention whether it belongs to list number one or two.

Here, I'll start:
Text Formatted Code

1)
$PHP_SELF
=>
$_SERVER['PHP_SELF']

2)
$HTTP_SERVER_VARS['PHP_SELF']
=>
$_SERVER['PHP_SELF']


 


P.S.
Download Auto Replace for a cool (installation free) freeware that can search and replace in multiple files in one click.
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
Isn't there a Register Globals off workaround. I remember seeing a little snippet of code one could add that would simulate Register Globals = on. I think it's on here somewhere a search should find it.
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
I think they are talking about completely eliminating the RG for better security.

Sam
 Quote

Status: offline

trinity

Forum User
Regular Poster
Registered: 01/30/05
Posts: 80
register globals are all but gone in cvs version Big Celebration

though many third party plugins are not Doh! - that was a mistake
glFusion - Technology Fused with Style - www.gllabs.org
 Quote

All times are EDT. The time is now 02:04 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content