[Pkg-owncloud-commits] [owncloud] 322/394: [user_webdavauth] Add requesttoken

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:40 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 9282641d06db4912098cb41f1c8a59b3eca4ac0f
Author: Lukas Reschke <lukas at statuscode.ch>
Date:   Sun Feb 3 20:02:29 2013 +0100

    [user_webdavauth] Add requesttoken
---
 apps/user_webdavauth/settings.php           |   10 ++++++----
 apps/user_webdavauth/templates/settings.php |    1 +
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/apps/user_webdavauth/settings.php b/apps/user_webdavauth/settings.php
index 5f1470a..7eabb0d 100755
--- a/apps/user_webdavauth/settings.php
+++ b/apps/user_webdavauth/settings.php
@@ -24,10 +24,12 @@
 OC_Util::checkAdminUser();
 
 if($_POST) {
-
-		if(isset($_POST['webdav_url'])) {
-			OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url']));
-		}
+	// CSRF check
+	OCP\JSON::callCheck();
+	
+	if(isset($_POST['webdav_url'])) {
+		OC_CONFIG::setValue('user_webdavauth_url', strip_tags($_POST['webdav_url']));
+	}
 }
 
 // fill template
diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php
index e6ca5d9..3e8b328 100755
--- a/apps/user_webdavauth/templates/settings.php
+++ b/apps/user_webdavauth/templates/settings.php
@@ -2,6 +2,7 @@
 	<fieldset class="personalblock">
 		<legend><strong>WebDAV Authentication</strong></legend>
 		<p><label for="webdav_url"><?php echo $l->t('WebDAV URL: http://');?><input type="text" id="webdav_url" name="webdav_url" value="<?php echo $_['webdav_url']; ?>"></label>
+			<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
 		<input type="submit" value="Save" />
 	</fieldset>
 </form>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list