A couple of security fixes.
This commit is contained in:
commit
d2907d72e8
@ -71,6 +71,7 @@ class BlogController(BaseController):
|
|||||||
c.page_title = c.post.title
|
c.page_title = c.post.title
|
||||||
return render(u'/blog/view.mako')
|
return render(u'/blog/view.mako')
|
||||||
|
|
||||||
|
@authenticate()
|
||||||
def comment_POST(self, id):
|
def comment_POST(self, id):
|
||||||
if not id:
|
if not id:
|
||||||
h.flash.set_message(u'There was a problem submitting your comment.', u'error')
|
h.flash.set_message(u'There was a problem submitting your comment.', u'error')
|
||||||
|
@ -20,7 +20,9 @@
|
|||||||
<li><a href="${page.url}">${page.name}</a></li>
|
<li><a href="${page.url}">${page.name}</a></li>
|
||||||
% endfor
|
% endfor
|
||||||
% if c.current_user:
|
% if c.current_user:
|
||||||
|
% if c.current_user.has_permission('Add Posts'):
|
||||||
<li><a href="${h.url_for(controller='post', action='new')}">New Post</a></li>
|
<li><a href="${h.url_for(controller='post', action='new')}">New Post</a></li>
|
||||||
|
% endif
|
||||||
<li><a href="${h.url_for(controller='admin', action='logout')}">Logout</a></li>
|
<li><a href="${h.url_for(controller='admin', action='logout')}">Logout</a></li>
|
||||||
% else:
|
% else:
|
||||||
<li><a href="${h.url_for(controller='admin', action='login')}">Login</a></li>
|
<li><a href="${h.url_for(controller='admin', action='login')}">Login</a></li>
|
||||||
|
Reference in New Issue
Block a user