git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2395ee3
)
Check IP in USERS_IMPL::Authorize as early as possible
author
Maxim Mamontov
<faust.madf@gmail.com>
Mon, 12 Sep 2011 08:10:25 +0000
(11:10 +0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Mon, 12 Sep 2011 08:10:25 +0000
(11:10 +0300)
projects/stargazer/users_impl.cpp
patch
|
blob
|
history
diff --git
a/projects/stargazer/users_impl.cpp
b/projects/stargazer/users_impl.cpp
index 7b110431130fbcb50fe02fbf8091c396bd39f8b3..6b87b5a96ae6dba91a24fe90e8e2918d58836d0d 100644
(file)
--- a/
projects/stargazer/users_impl.cpp
+++ b/
projects/stargazer/users_impl.cpp
@@
-280,9
+280,6
@@
if (FindByNameNonLock(login, &iter))
return false;
}
-if (iter->Authorize(ip, enabledDirs, auth))
- return false;
-
if (FindByIPIdx(ip, iter))
{
if (iter->GetLogin() != login)
@@
-292,9
+289,14
@@
if (FindByIPIdx(ip, iter))
iter->GetLogin().c_str());
return false;
}
+ if (iter->Authorize(ip, enabledDirs, auth))
+ return false;
return true;
}
+if (iter->Authorize(ip, enabledDirs, auth))
+ return false;
+
AddToIPIdx(iter);
return true;
}