rejetto forum
Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Mars on February 02, 2010, 06:57:12 PM
-
procedure TmainFrm.appEventsShowHint
...
s:=flag('Invisible', FA_HIDDENTREE, TRUE);
if s = '' then s:=flag('Invisible', FA_HIDDEN);
result:=result+s
+flag('Download forbidden', FA_DL_FORBIDDEN)
+flagR('Don''t log', FA_DONT_LOG);
'Invisible' and 'Download forbidden' are inherited flags
procedure TmainFrm.appEventsShowHint
...
s:=flagR('Invisible', FA_HIDDENTREE, TRUE);
if s = '' then s:=flag('Invisible', FA_HIDDEN);
result:=result+s
+flagR('Download forbidden', FA_DL_FORBIDDEN)
+flagR('Don''t log', FA_DONT_LOG);
-
ok for hiddentree.
dl_forbidden is a bitter one. it is NOT recursive by design, but i see some strange recursion in the code. i fear there's an inconsistent behavior. it will take a while to study it, i cannot do it right now.
-
ok. i did my best with the short time i had.
i made some changes to the way "no download" is handled, to reflect its designed nature.
my purpose was not to improve it, but to make it coherent with how it was thinked and documented (was "let download").
if you have time, please check the changes in the source (build 255) and report if there's a possibility to break the security.
-
dl_forbidden is a bitter one. it is NOT recursive by design
function Tfile.accessFor(username, password:string):boolean;
var
a: Paccount;
f: Tfile;
list: TStringDynArray;
begin
result:=FALSE;
if isFile() and hasRecursive(FA_DL_FORBIDDEN) then exit;
result:=FALSE;
f:=self;
-
that's what i meant when i said
but i see some strange recursion in the code.
what i found is that most of times that recursion was a simple way to make it work, since there's a form of single-step inheriting for real folders.
it's the GUI that prevents you from applying it to virtual folders.
i decided to change it, because it's confusing.
if you want to check my changes i can send you a preview.