changeset 3432:0b56ed4808a6

action.newpage, macro.NewPage: changed to POST
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 29 Mar 2008 23:17:59 +0100
parents b64bd80bd53c
children 21d9d7529304
files MoinMoin/action/newpage.py MoinMoin/macro/NewPage.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/newpage.py	Sat Mar 29 22:28:46 2008 +0100
+++ b/MoinMoin/action/newpage.py	Sat Mar 29 23:17:59 2008 +0100
@@ -96,5 +96,8 @@
 
 def execute(pagename, request):
     """ Temporary glue code for current moin action system """
+    if request.request_method != 'POST':
+        return False, u''
+
     return NewPage(request, pagename).render()
 
--- a/MoinMoin/macro/NewPage.py	Sat Mar 29 22:28:46 2008 +0100
+++ b/MoinMoin/macro/NewPage.py	Sat Mar 29 23:17:59 2008 +0100
@@ -75,7 +75,7 @@
 
         # TODO: better abstract this using the formatter
         html = [
-            u'<form class="macro" method="get" action="%s/%s"><div>' % (self.request.getScriptname(), wikiutil.quoteWikinameURL(self.formatter.page.page_name)),
+            u'<form class="macro" method="POST" action="%s/%s"><div>' % (self.request.getScriptname(), wikiutil.quoteWikinameURL(self.formatter.page.page_name)),
             u'<input type="hidden" name="action" value="newpage">',
             u'<input type="hidden" name="parent" value="%s">' % wikiutil.escape(self.parent, 1),
             u'<input type="hidden" name="template" value="%s">' % wikiutil.escape(self.template, 1),