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
|
||||
return render(u'/blog/view.mako')
|
||||
|
||||
@authenticate()
|
||||
def comment_POST(self, id):
|
||||
if not id:
|
||||
h.flash.set_message(u'There was a problem submitting your comment.', u'error')
|
||||
|
@ -20,10 +20,12 @@
|
||||
<li><a href="${page.url}">${page.name}</a></li>
|
||||
% endfor
|
||||
% if c.current_user:
|
||||
<li><a href="${h.url_for(controller='post',action='new')}">New Post</a></li>
|
||||
<li><a href="${h.url_for(controller='admin',action='logout')}">Logout</a></li>
|
||||
% if c.current_user.has_permission('Add Posts'):
|
||||
<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>
|
||||
% 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>
|
||||
% endif
|
||||
</ul>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user