Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 registered (Gizmo, Ruben Rocha, 1 invisible), 21 Guests and 20 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/15/08
Posts: 1
Top Posters (30 Days)
Ruben Rocha 162
Rick 116
Gizmo 108
Thelockman 62
driv 56
AllenAyres 35
ScriptKeeper 34
Ian 31
Mark S 30
blaaskaak 29
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#110551 - 04/24/02 07:56 AM Inappropriate Creation of cache- & user_groups directory [bugfix provided] [FIXED - 6.3.0]
Anonymous
Unregistered


Where: UBB 6.3 BR 1 - ubb_lib_secgroups.cgi

Description: Incorrect usage of $_[0]. $_[0] is a anonymous hash that seems to contain the %in as well %filehandler (%filehandler has %lockfile which has %config). There is also a shortcut {CONFIG} reference. The problem lies in the following code:

<pre>
if (!-d "$_[0]->{NonCGIPath}/cache-$_[0]->{cache_pw}") {
mkdir("$_[0]->{NonCGIPath}/cache-$_[0]->{cache_pw}", 0777);
chmod(0777, "$_[0]->{NonCGIPath}/cache-$_[0]->{cache_pw}");
} # cache

if (!-d "$_[0]->{MembersPath}/user_groups") {
mkdir("$_[0]->{MembersPath}/user_groups", 0777);
chmod(0777, "$_[0]->{MembersPath}/user_groups");
} # user_groups
</pre>

$_[0] is incorrectly referenced and thus will cause unnecessary directories to be created.

Fix: To fix this, make use of $_[0]->{CONFIG} like the following:

<pre>
if (!-d "$_[0]->{CONFIG}->{NonCGIPath}/cache-$_[0]->{cache_pw}") {
mkdir("$_[0]->{CONFIG}->{NonCGIPath}/cache-$_[0]->{cache_pw}", 0777);
chmod(0777, "$_[0]->{CONFIG}=>{NonCGIPath}/cache-$_[0]->{cache_pw}");
} # cache

if (!-d "$_[0]->{CONFIG}->{MembersPath}/user_groups") {
mkdir("$_[0]->{CONFIG}->{MembersPath}/user_groups", 0777);
chmod(0777, "$_[0]->{CONFIG}->{MembersPath}/user_groups");
} # user_groups

</pre>

[This message was edited by Charles Capps on August 23, 2002 at 10:35 AM.]

Top
#110552 - 04/24/02 11:26 AM Re: Inappropriate Creation of cache- & user_groups directory [bugfix provided] [FIXED - 6.3.0]
Anonymous
Unregistered


THANK YOU qasic! I've been trying to figure this one out for quite a long time... Fixed in 6.3.1

--
Charles Capps
UBB.classic™ Developer
Having problems? Open up a support ticket!

Top


Shout Box

Today's Birthdays
Neptin
Recent Topics
How do I set Moderation Queue for an individual user?
by luket
11/20/08 11:28 AM
Custom Island per Forum?
by unixpaul
11/20/08 10:18 AM
SQL Corruption?
by Jason Carey
11/20/08 05:52 AM
adding views column to portal page
by nick1
11/20/08 05:12 AM
Upload broken in 7.4.1
by MacW
11/20/08 03:23 AM
Forum Stats
4247 Members
33 Forums
30483 Topics
154630 Posts

Max Online: 978 @ 06/24/07 08:19 PM