From 6a4bc3d04eca64d9db794b427e6377c8f9a673f6 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 30 Nov 2018 16:09:34 +0000 Subject: Initial working version. --- cat.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cat.php (limited to 'cat.php') diff --git a/cat.php b/cat.php new file mode 100644 index 0000000..25afa6f --- /dev/null +++ b/cat.php @@ -0,0 +1,37 @@ +. +*/ + +require 'config.php'; +require 'common.php'; + +global $config; + +$url = Sanatise($_REQUEST['u']); +$fname = basename($url); + +$cmd = $config['svn'] . ' cat --non-interactive ' . + '--username=' . $config['username'] . ' ' . + '--password=' . $config['password'] . ' ' . + escapeshellarg($url); + +header('Content-Type: ' . GuessMimeType($fname)); +header('Content-Disposition: inline; filename="' . $fname . '"'); +passthru($cmd); +?> -- cgit v1.2.3