From f1befcf7f35472f6f88a9b5feea53717e386d780 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 24 May 2020 16:15:07 +0530 Subject: BaseGitActivity: always enforce absolute URLs (#788) --- app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt index 8ad495fa..fb7d7e82 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt @@ -113,9 +113,7 @@ abstract class BaseGitActivity : AppCompatActivity() { val portPart = if (serverPort == "22" || serverPort.isEmpty()) "" else ":$serverPort" if (portPart.isEmpty()) { - // We only support relative paths with the standard port. - val pathPart = serverPath.trimStart('/', ':') - "$userPart$hostnamePart:$pathPart" + "$userPart$hostnamePart:$serverPath" } else { // Only absolute paths are supported with custom ports. if (!serverPath.startsWith('/')) -- cgit v1.2.3