From 8497e5b95d9311e2443c4517752a2befb9b92a72 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Fri, 28 Aug 2020 15:28:34 +0100 Subject: [PATCH] GitHub/Gitlab/Gitea savers: Handle empty paths correctly Fixes #4656 --- core/modules/savers/gitea.js | 2 +- core/modules/savers/github.js | 2 +- core/modules/savers/gitlab.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/savers/gitea.js b/core/modules/savers/gitea.js index c2f56a56d..d88800d8c 100644 --- a/core/modules/savers/gitea.js +++ b/core/modules/savers/gitea.js @@ -34,7 +34,7 @@ GiteaSaver.prototype.save = function(text,method,callback) { "Authorization": "Basic " + window.btoa(username + ":" + password) }; // Bail if we don't have everything we need - if(!username || !password || !repo || !path || !filename) { + if(!username || !password || !repo || !filename) { return false; } // Make sure the path start and ends with a slash diff --git a/core/modules/savers/github.js b/core/modules/savers/github.js index a93b9e5ba..7585db34e 100644 --- a/core/modules/savers/github.js +++ b/core/modules/savers/github.js @@ -34,7 +34,7 @@ GitHubSaver.prototype.save = function(text,method,callback) { "Authorization": "Basic " + window.btoa(username + ":" + password) }; // Bail if we don't have everything we need - if(!username || !password || !repo || !path || !filename) { + if(!username || !password || !repo || !filename) { return false; } // Make sure the path start and ends with a slash diff --git a/core/modules/savers/gitlab.js b/core/modules/savers/gitlab.js index 915545afe..7796ed743 100644 --- a/core/modules/savers/gitlab.js +++ b/core/modules/savers/gitlab.js @@ -34,7 +34,7 @@ GitLabSaver.prototype.save = function(text,method,callback) { "Private-Token": password }; // Bail if we don't have everything we need - if(!username || !password || !repo || !path || !filename) { + if(!username || !password || !repo || !filename) { return false; } // Make sure the path start and ends with a slash