#17 Bug in 1.08 by creating Repo

v1.0 (example)
closed-fixed
nobody
None
5
2015-02-20
2009-10-20
No

i made an update from 1.03 to 1.08 an with the new Version i can't create a new repro.
After a little bit of Debugging i found this in svnmanager-1.08/svnmanager/RepositoryModule/DataModule.php
Line 54:
$a_dir = $svn_repos_loc.DIRECTORY_SEPARATOR.escapeshellarg($rname);

Are you sure that escapeshellarg is the right command ?
Because with this my repo name is in Single Quotes.
I think the right command is escapeshellcmd

Sry for my bad english :D

Discussion

  • Christian Hansen

    Hmmm i think the right version should be:
    $a_dir = escapeshellarg($svn_repos_loc.DIRECTORY_SEPARATOR.$rname);

     
  • Felix Zhu

    Felix Zhu - 2010-02-21

    I have reproduced this bug in windows 2k3 with apache 2.2 php 5.3.1 and svnmanager 1.08.

    I think the problem lies in
    svnmanager-1.08/svnmanager/RepositoryModule/DataModule.php

    $ret = exec("LANG".$lang."$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
    (sorry that after several edits, i lose the original line number)
    since i found
    'LANG' is not recognized as an internal or external command,"
    in my apache logs

    After i changed the line into:
    $ret = exec("$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
    It successfully create my new repos now.
    Is it because there's no LANG environment variable on win2k3?

    I'm completely new to PHP, so this may not be the exact solution, but it seems working well now.

    Regards

     
  • Gionapoli

    Gionapoli - 2010-04-22

    I found that the create command fails if in the config.php there is;
    $svnadmin_cmd = "c:\\Program Files\\CollabNet\\Subversion Server\\svnadmin";
    I corrected as follow:
    $svnadmin_cmd = "\""."c:\\Program Files\\CollabNet\\Subversion Server\\svnadmin"."\"";
    Further I had to change in RepositoryModule\DataModule.php
    $ret = exec("LANG=".$lang.";$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");
    to
    $ret = exec("$svnadmin_cmd --config-dir $svn_config_dir create $a_dir");

    Bye

     
  • Marijn Verkerk

    Marijn Verkerk - 2015-02-20

    Thanks all for comments.. should be fixed now

     
  • Marijn Verkerk

    Marijn Verkerk - 2015-02-20
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks