Skip to content

WebSVN's diffs do not work on Windows #210

@raspopov

Description

@raspopov

The next code at include\command.php:123:

	// https://github.com/websvnphp/websvn/issues/75
	// https://github.com/websvnphp/websvn/issues/78
	if ($config->serverIsWindows) {
		if (!strpos($cmd, '>') && !strpos($cmd, '|')) {
			$opts = array('bypass_shell' => true);
		} else {
			$cmd = '"'.$cmd.'"'; <-- THIS LINE
		}
	}

produces the wrong escaping of cmd.exe on Windows for example:
cmd.exe /s /c """C:\svn\svn" --non-interactive --config-dir C:\svn\config --trust-server-cert cat -r 15 "file:///C:/Repositories/c4u/trunk/include/CoTaskMem.h@16" > "C:\php\tmp\1DDA.tmp"""
i.e. 3 quotation marks at the beginning and end of the command line instead of 2.
This bug effectively turns off the diffs of the revisions.

PHP 8.2.7, WebSVN 2.8.3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions