Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77bbb405fb | ||
|
|
7592cd2fe0 | ||
|
|
c5b996c8b1 | ||
|
|
ae0749d6b8 |
@@ -1,8 +1,9 @@
|
|||||||
## 2.9.1
|
## 2.9.1 - 2.9.3
|
||||||
|
|
||||||
- jquery 1.11
|
- jquery 1.11
|
||||||
- codemirror 3.21, thanks Paolo Valleri
|
- codemirror 3.21, thanks Paolo Valleri
|
||||||
- fixed a security issue with sessions in database
|
- fixed security issue with sessions in database, thanks Nathan Humphreys
|
||||||
|
- fixed security issue with persistant data in session, thanks Kiran
|
||||||
- fixed security issue with redirect after expired login, thanks André Kablu
|
- fixed security issue with redirect after expired login, thanks André Kablu
|
||||||
- cleaner DAL and rname integration, thanks niphlod and Michele
|
- cleaner DAL and rname integration, thanks niphlod and Michele
|
||||||
- added mongodb and imap tests for dal, thanks Alan
|
- added mongodb and imap tests for dal, thanks Alan
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ update:
|
|||||||
echo "remember that pymysql was tweaked"
|
echo "remember that pymysql was tweaked"
|
||||||
src:
|
src:
|
||||||
### Use semantic versioning
|
### Use semantic versioning
|
||||||
echo 'Version 2.9.2-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
echo 'Version 2.9.3-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION
|
||||||
### rm -f all junk files
|
### rm -f all junk files
|
||||||
make clean
|
make clean
|
||||||
### clean up baisc apps
|
### clean up baisc apps
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Version 2.9.2-stable+timestamp.2014.03.02.17.46.39
|
Version 2.9.3-stable+timestamp.2014.03.03.08.49.54
|
||||||
|
|||||||
@@ -75,8 +75,8 @@
|
|||||||
* this over and over... all will be bound to the document
|
* this over and over... all will be bound to the document
|
||||||
*/
|
*/
|
||||||
/*adds btn class to buttons*/
|
/*adds btn class to buttons*/
|
||||||
$('button', target).addClass('btn').addClass('btn-default');
|
$('button', target).addClass('btn');
|
||||||
$('form input[type="submit"], form input[type="button"]', target).addClass('btn').addClass('btn-default');
|
$('form input[type="submit"], form input[type="button"]', target).addClass('btn');
|
||||||
/* javascript for PasswordWidget*/
|
/* javascript for PasswordWidget*/
|
||||||
$('input[type=password][data-w2p_entropy]', target).each(function () {
|
$('input[type=password][data-w2p_entropy]', target).each(function () {
|
||||||
web2py.validate_entropy($(this));
|
web2py.validate_entropy($(this));
|
||||||
|
|||||||
@@ -75,8 +75,8 @@
|
|||||||
* this over and over... all will be bound to the document
|
* this over and over... all will be bound to the document
|
||||||
*/
|
*/
|
||||||
/*adds btn class to buttons*/
|
/*adds btn class to buttons*/
|
||||||
$('button', target).addClass('btn').addClass('btn-default');
|
$('button', target).addClass('btn');
|
||||||
$('form input[type="submit"], form input[type="button"]', target).addClass('btn').addClass('btn-default');
|
$('form input[type="submit"], form input[type="button"]', target).addClass('btn');
|
||||||
/* javascript for PasswordWidget*/
|
/* javascript for PasswordWidget*/
|
||||||
$('input[type=password][data-w2p_entropy]', target).each(function () {
|
$('input[type=password][data-w2p_entropy]', target).each(function () {
|
||||||
web2py.validate_entropy($(this));
|
web2py.validate_entropy($(this));
|
||||||
|
|||||||
@@ -1,50 +1,35 @@
|
|||||||
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
|
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
|
||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
|
|
||||||
{{block head}}
|
{{if 'message' in globals():}}
|
||||||
<style>
|
<h3>{{=message}}</h3>
|
||||||
#w2padmin-btn {margin:30px 0 30px 0;}
|
|
||||||
</style>
|
<h4>{{=T('How did you get here?')}}</h4>
|
||||||
{{end head}}
|
<ol>
|
||||||
|
<li>{{=T('You are successfully running web2py')}}</li>
|
||||||
{{if 'message' in globals():}}
|
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
|
||||||
<h2>{{=message}}</h2>
|
<li>{{=XML(T('Which called the function %s located in the file %s',
|
||||||
<p class="lead">{{=T('How did you get here?')}}</p>
|
(A(request.function+'()',_href='#'),
|
||||||
<ol>
|
A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,
|
||||||
<li>{{=T('You are successfully running web2py')}}</li>
|
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
|
||||||
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
|
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
|
||||||
<li>{{=XML(T('Which called the function %s located in the file %s',
|
A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,
|
||||||
(A(request.function+'()',_href='#'),
|
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
|
||||||
A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,
|
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
|
||||||
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
|
</ol>
|
||||||
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
|
{{elif 'content' in globals():}}
|
||||||
A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,
|
{{=content}}
|
||||||
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
|
{{else:}}
|
||||||
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
|
{{=BEAUTIFY(response._vars)}}
|
||||||
</ol>
|
{{pass}}
|
||||||
{{elif 'content' in globals():}}
|
|
||||||
{{=content}}
|
{{block right_sidebar}}
|
||||||
{{else:}}
|
{{=A(T("Administrative Interface"), _href=URL('admin','default','index'), _class='btn',
|
||||||
{{=BEAUTIFY(response._vars)}}
|
_style='margin-top: 1em;')}}
|
||||||
{{pass}}
|
<h6>{{=T("Don't know what to do?")}}</h6>
|
||||||
|
<ul>
|
||||||
{{block right_sidebar}}
|
<li>{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
|
||||||
<button id="w2padmin-btn" class="btn btn-primary btn-lg btn-block">
|
<li><a href="http://web2py.com">web2py.com</a></li>
|
||||||
<i class="glyphicon glyphicon-cog"></i> {{=T("Administrative Interface")}}</button>
|
<li><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
|
||||||
<div class="panel panel-info">
|
</ul>
|
||||||
<div class="panel-heading">{{=T("Don't know what to do?")}}</div>
|
{{end}}
|
||||||
<ul class="list-group">
|
|
||||||
<li class="list-group-item">{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
|
|
||||||
<li class="list-group-item"><a href="http://web2py.com">web2py.com</a></li>
|
|
||||||
<li class="list-group-item"><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{block page_js}}
|
|
||||||
<script>
|
|
||||||
$('#w2padmin-btn').click(function() {
|
|
||||||
window.location = "{{=URL('admin','default','index')}}";
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{{end}}
|
|
||||||
|
|||||||
@@ -887,6 +887,7 @@ class Session(Storage):
|
|||||||
# Unpickle the data
|
# Unpickle the data
|
||||||
session_data = cPickle.loads(row.session_data)
|
session_data = cPickle.loads(row.session_data)
|
||||||
self.update(session_data)
|
self.update(session_data)
|
||||||
|
response.session_new = False
|
||||||
else:
|
else:
|
||||||
record_id = None
|
record_id = None
|
||||||
if record_id:
|
if record_id:
|
||||||
|
|||||||
+18
-7
@@ -1153,16 +1153,27 @@ class Auth(object):
|
|||||||
self.user_groups = auth and auth.user_groups or {}
|
self.user_groups = auth and auth.user_groups or {}
|
||||||
if secure:
|
if secure:
|
||||||
request.requires_https()
|
request.requires_https()
|
||||||
if auth and auth.last_visit and auth.last_visit + \
|
now = request.now
|
||||||
datetime.timedelta(days=0, seconds=auth.expiration) > request.now:
|
# if we have auth info
|
||||||
self.user = auth.user
|
# if not expired it, used it
|
||||||
# this is a trick to speed up sessions
|
# if expired, clear the session
|
||||||
if (request.now - auth.last_visit).seconds > (auth.expiration / 10):
|
# else, only clear auth info in the session
|
||||||
auth.last_visit = request.now
|
if auth:
|
||||||
|
delta = datetime.timedelta(days=0, seconds=auth.expiration)
|
||||||
|
if auth.last_visit and auth.last_visit + delta > now:
|
||||||
|
self.user = auth.user
|
||||||
|
# this is a trick to speed up sessions to avoid many writes
|
||||||
|
if (now - auth.last_visit).seconds > (auth.expiration / 10):
|
||||||
|
auth.last_visit = request.now
|
||||||
|
else:
|
||||||
|
self.user = None
|
||||||
|
if session.auth:
|
||||||
|
del session.auth
|
||||||
|
session.renew(clear_session=True)
|
||||||
else:
|
else:
|
||||||
self.user = None
|
self.user = None
|
||||||
if session.auth:
|
if session.auth:
|
||||||
del session.auth
|
del session.auth
|
||||||
# ## what happens after login?
|
# ## what happens after login?
|
||||||
|
|
||||||
url_index = URL(controller, 'index')
|
url_index = URL(controller, 'index')
|
||||||
|
|||||||
Reference in New Issue
Block a user