PDA

View Full Version : [Todo] RETR ../file & sections cookies


ADDiCT
01-28-2004, 01:06 PM
VFS setup:
c:\ftproot\ /
g:\games\ /incoming/games/

Section setup:
games = /incoming/games/* 1 1
default = /* 0 0

User's PWD: /
(so he's in section 0)

Downloading a file with :
RETR /incoming/games/release/filename.rar
(which is in section 1)

ioFTPD works correct, it removes credits from section 1 creditcounter.


Now here's the "problem":
Environment variables are set to section 0, so if a script uses those env. vars. to check something, it will think that the user downloaded a file in section 0.
(no idea if it applies to itcl as well)

Also:
shmem ONLINEDATA struct contains / for PWD and c:\ftproot\ for realpath, while in effect, the file is in g:\games\release\
This makes it impossible to check the filesize of the local file.


Is there any way to get the correct section/path without blocking "RETR */*" commands?

darkone
01-28-2004, 03:55 PM
Hmms yep.. I can see that as a issue. Those section variables show current section user is in. Not the section file is in... I'm sooing doing some rewriting on cookiesystem, I'll try to add some new cookies then.

darkone
01-28-2004, 04:09 PM
Btw. shmem stores those variables to tszRealDataPath & tszVirtualDataPath :)