Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
d4510041
Commit
d4510041
authored
Jul 17, 2008
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Attempt to address login problems reported by Rob in Trac ticket
#213
.
parent
c5c4ea22
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
13 deletions
+38
-13
collab/trac/emulab_auth.py
collab/trac/emulab_auth.py
+4
-2
www/defs.php3.in
www/defs.php3.in
+17
-2
www/gototrac.php3
www/gototrac.php3
+10
-7
www/tbauth.php3
www/tbauth.php3
+7
-2
No files found.
collab/trac/emulab_auth.py
View file @
d4510041
...
...
@@ -58,7 +58,7 @@ class EmulabAuthModule(auth.LoginModule):
return
auth
.
LoginModule
.
_do_login
(
self
,
req
)
if
req
.
args
.
get
(
'goto'
):
req
.
redirect
(
self
.
env
.
abs_href
()
+
req
.
args
.
get
(
'goto'
))
req
.
redirect
(
self
.
env
.
abs_href
()
+
"/"
+
req
.
args
.
get
(
'goto'
))
else
:
req
.
redirect
(
self
.
env
.
abs_href
())
pass
...
...
@@ -135,7 +135,9 @@ class EmulabAuthModule(auth.LoginModule):
html
.
A
(
'Logout'
,
href
=
req
.
href
.
logout
()))
else
:
shortname
=
os
.
path
.
basename
(
self
.
env
.
path
)
url
=
'https://www.emulab.net/gototrac.php3?login=1&wiki=%s'
%
shortname
page
=
req
.
path_info
[
1
:]
or
'wiki/WikiStart'
url
=
'https://www.emulab.net/gototrac.php3?login=1&wiki=%s&do=%s'
%
(
shortname
,
page
)
yield
(
'metanav'
,
'login'
,
html
.
A
(
'Login'
,
href
=
url
))
pass
pass
...
...
www/defs.php3.in
View file @
d4510041
...
...
@@ -15,7 +15,7 @@ $OURDOMAIN = "@OURDOMAIN@";
$BOSSNODE
=
"@BOSSNODE@"
;
$USERNODE
=
"@USERNODE@"
;
$CVSNODE
=
"cvs.${OURDOMAIN}"
;
$WIKINODE
=
"wiki.${OURDOMAIN}"
;
$WIKINODE
=
$USERNODE
;
$TBADMINGROUP
=
"@TBADMINGROUP@"
;
$WWWHOST
=
"@WWWHOST@"
;
$WWW
=
"@WWW@"
;
...
...
@@ -40,10 +40,10 @@ $WIKIURL = "${WIKIHOME}/bin/newlogon";
$WIKICOOKIENAME
=
"WikiCookie"
;
$BUGDBURL
=
"https://${USERNODE}/flyspray"
;
$BUGDBCOOKIENAME
=
"FlysprayCookie"
;
$TRACCOOKIENAME
=
"TracCookie"
;
$MAILMANURL
=
"http://${USERNODE}/mailman"
;
$OPSCVSURL
=
"http://${USERNODE}/cvsweb/cvsweb.cgi"
;
$OPSJETIURL
=
"http://${USERNODE}/jabber/jeti.php"
;
$WIKIDOCURL
=
"http://${WIKINODE}/wikidocs"
;
$MIN_UNIX_UID
=
@
MIN_UNIX_UID
@
;
$MIN_UNIX_GID
=
@
MIN_UNIX_GID
@
;
$EXPOSELINKTEST
=
1
;
...
...
@@ -51,6 +51,7 @@ $EXPOSESTATESAVE= 0;
$EXPOSEARCHIVE
=
0
;
$EXPOSETEMPLATES
=
0
;
$USERSELECTUIDS
=
1
;
$REMOTEWIKIDOCS
=
0
;
$TBMAILADDR_OPS
=
"@TBOPSEMAIL_NOSLASH@"
;
$TBMAILADDR_WWW
=
"@TBWWWEMAIL_NOSLASH@"
;
...
...
@@ -82,6 +83,20 @@ if ($WWWHOST != "www.emulab.net") {
$TBMAINSITE
=
0
;
}
#
# The wiki docs either come from the local node, or in most cases
# they are redirected back to Utah's emulab.
#
if
(
$TBMAINSITE
)
{
$WIKIDOCURL
=
"https://${WIKINODE}/wikidocs/wiki"
;
}
elseif
(
$REMOTEWIKIDOCS
)
{
$WIKIDOCURL
=
"https://wiki.emulab.net/wikidocs/wiki"
;
}
else
{
$WIKIDOCURL
=
"/wikidocs/wiki"
;
}
$TBPROJ_DIR
=
"@PROJROOT_DIR@"
;
$TBUSER_DIR
=
"@USERSROOT_DIR@"
;
$TBGROUP_DIR
=
"@GROUPSROOT_DIR@"
;
...
...
www/gototrac.php3
View file @
d4510041
...
...
@@ -38,22 +38,22 @@ if ($wiki == "geni") {
USERERROR
(
"You do not have permission to access the Trac wiki!"
,
1
);
}
$wiki
=
"protogeni"
;
$TRACURL
=
"https://www.protogeni.net/trac/
$wiki
"
;
$
TRAC
COOKIENAME
=
"trac_auth_protogeni_priv"
;
$TRACURL
=
"https://www.protogeni.net/trac/
$wiki
"
;
$COOKIENAME
=
"trac_auth_protogeni_priv"
;
}
elseif
(
$wiki
!=
"emulab"
)
{
USERERROR
(
"Unknown Trac wiki
$wiki
!"
,
1
);
}
else
{
$TRACURL
=
"https://${USERNODE}/trac/
$wiki
"
;
$
TRAC
COOKIENAME
=
"trac_auth_${wiki}"
;
$TRACURL
=
"https://${USERNODE}/trac/
$wiki
"
;
$COOKIENAME
=
"trac_auth_${wiki}"
;
}
#
# Look for our cookie. If the browser has it, then there is nothing
# more to do; just redirect the user over to the wiki.
#
if
(
!
$login
)
{
if
(
!
$login
&&
isset
(
$_COOKIE
[
$TRACCOOKIENAME
])
)
{
$url
=
$TRACURL
;
if
(
isset
(
$do
))
{
$url
.
=
"/"
.
$do
;
...
...
@@ -75,8 +75,11 @@ $hash = $matches[1];
if
(
$wiki
==
"protogeni"
)
{
# We do this for the private wiki. Temporary.
setcookie
(
$
TRAC
COOKIENAME
,
$hash
,
0
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
setcookie
(
$COOKIENAME
,
$hash
,
0
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
}
# This cookie tells boss that we have logged into Trac, but nothing else.
setcookie
(
$TRACCOOKIENAME
,
$hash
,
0
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
header
(
"Location: ${TRACURL}/xlogin?user=
$uid
&hash=
$hash
"
.
(
isset
(
$do
)
?
"&goto=
/
${do}"
:
""
));
(
isset
(
$do
)
?
"&goto=${do}"
:
""
));
www/tbauth.php3
View file @
d4510041
...
...
@@ -901,7 +901,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
global
$TBNAMECOOKIE
,
$TBLOGINCOOKIE
,
$TBSECURECOOKIES
,
$TBEMAILCOOKIE
;
global
$TBMAIL_OPS
,
$TBMAIL_AUDIT
,
$TBMAIL_WWW
;
global
$WIKISUPPORT
,
$WIKICOOKIENAME
;
global
$BUGDBSUPPORT
,
$BUGDBCOOKIENAME
,
$TRACSUPPORT
;
global
$BUGDBSUPPORT
,
$BUGDBCOOKIENAME
,
$TRACSUPPORT
,
$TRACCOOKIENAME
;
# Caller makes these checks too.
if
(
!
TBvalid_uid
(
$uid
))
{
...
...
@@ -994,6 +994,7 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null, $adminon = 0)
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
setcookie
(
"trac_auth_protogeni_priv"
,
""
,
$flushtime
,
"/"
,
$TBAUTHDOMAIN
,
$TBSECURECOOKIES
);
setcookie
(
$TRACCOOKIENAME
,
""
,
$flushtime
,
"/"
,
$TBAUTHDOMAIN
,
0
);
}
DBQueryFatal
(
"update users set "
.
...
...
@@ -1032,7 +1033,7 @@ function DOLOGOUT($user) {
global
$CHECKLOGIN_STATUS
,
$CHECKLOGIN_USER
;
global
$TBAUTHCOOKIE
,
$TBLOGINCOOKIE
,
$TBAUTHDOMAIN
;
global
$WIKISUPPORT
,
$WIKICOOKIENAME
,
$HTTP_COOKIE_VARS
;
global
$BUGDBSUPPORT
,
$BUGDBCOOKIENAME
;
global
$BUGDBSUPPORT
,
$BUGDBCOOKIENAME
,
$TRACSUPPORT
,
$TRACCOOKIENAME
;
if
(
!
$CHECKLOGIN_USER
)
return
1
;
...
...
@@ -1090,6 +1091,10 @@ function DOLOGOUT($user) {
setcookie
(
$TBAUTHCOOKIE
,
""
,
$timeout
,
"/"
,
$TBAUTHDOMAIN
,
0
);
setcookie
(
$TBLOGINCOOKIE
,
""
,
$timeout
,
"/"
,
$TBAUTHDOMAIN
,
0
);
if
(
$TRACSUPPORT
)
{
setcookie
(
$TRACCOOKIENAME
,
""
,
$timeout
,
"/"
,
$TBAUTHDOMAIN
,
0
);
}
if
(
$WIKISUPPORT
)
{
setcookie
(
$WIKICOOKIENAME
,
""
,
$timeout
,
"/"
,
$TBAUTHDOMAIN
,
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment