commit 00287c400a57fa661730e9d9b4ca2d7bb417796f
parent 2d5a90c020e1c9aa66309f581c16a3dcc8f91afd
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 4 May 2024 17:09:01 +0200
Decode parameters
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/create_repo/index.php b/create_repo/index.php
@@ -7,7 +7,7 @@
$repo_type = preg_replace(
'/[^a-z]/',
'',
- basename($_GET["type"])
+ rawurldecode(basename($_GET["type"]))
);
if ($repo_type != "pub") {
$repo_type = "priv";
@@ -17,21 +17,21 @@ if ($repo_type != "pub") {
$repo_name = preg_replace(
'/[^a-zA-Z0-9\s\.\,\!\?\:\_\-]/',
'',
- basename($_GET["name"])
+ rawurldecode(basename($_GET["name"]))
);
// Fetch Repository Description
$repo_desc = preg_replace(
'/[^a-zA-Z0-9\s\.\,\!\?\:\_\-]/',
'',
- $_GET["description"]
+ rawurldecode($_GET["description"])
);
// Fetch Repository Owner
$repo_owner = preg_replace(
'/[^a-zA-Z0-9\s\.\,\!\?\:\_\-]/',
'',
- basename($_GET["owner"])
+ rawurldecode(basename($_GET["owner"]))
);
?>
@@ -81,12 +81,12 @@ $repo_owner = preg_replace(
<label for="description">Repository Description</label><br>
<input type="text" id="description" name="description" maxlength="100" placeholder="This project is about..." default=<?php echo "\"" . $repo_desc . "\""; ?> required><br>
<label for="owner" >Repository Owner</label><br>
- <input type="text" id="owner" name="owner"maxlength="30"placeholder="Me" default=<?php echo "\"" . $repo_owner . "\""; ?> required><br>
+ <input type="text" id="owner" name="owner" maxlength="30" placeholder="Me" default=<?php echo "\"" . $repo_owner . "\""; ?> required><br>
<label for="type">Repository Type</label><br>
<select name="type" required>
<option value="priv" selected>Private</option>
<option value="pub">Public</option>
- </select><br>
+ </select><br><br>
<input type="submit" value="Submit">
</form>
</div>