You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/08/26 14:35:24 UTC

[whimsy] branch master updated: check for writable

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  94aa1e2   check for writable
94aa1e2 is described below

commit 94aa1e2df9044fb52b2f4f62821f04745647364e
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Fri Aug 26 10:35:12 2016 -0400

    check for writable
---
 www/status/svn.cgi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/status/svn.cgi b/www/status/svn.cgi
index 0830ee7..c4c6e7f 100755
--- a/www/status/svn.cgi
+++ b/www/status/svn.cgi
@@ -14,7 +14,7 @@ require 'whimsy/asf'
 repository_file = File.expand_path('../../../repository.yml', __FILE__)
 repository = YAML.load_file(repository_file)
 
-svnrepos = ASF::Config.get(:svn)
+svnrepos = Array(ASF::Config.get(:svn))
 
 _html do
   _link rel: 'stylesheet', href: 'css/status.css'
@@ -27,7 +27,8 @@ _html do
   }
 
   writable = true
-  svnroot = (svnrepos.length == 1 && svnrepos.first =~ /^(\/\w[-.\w]*)+\/\*$/)
+  svnroot = (svnrepos.length == 1 && svnrepos.first =~ /^(\/\w[-.\w]*)+\/\*$/ &&
+    File.writable?(svnrepos.first.chomp('*').untaint))
 
   _h1_ 'SVN Repository Status'
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].