about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-08-03 17:22:01 +0200
committerbptato <nincsnevem662@gmail.com>2022-08-03 17:22:01 +0200
commit94ca8979ffddda23c645c80ff32ae708206bf94b (patch)
tree13ac160de01209b70cbddc5a591fb510826bcbf0 /src/types
parentad5adef77d2aa285cdfdce9917514c0e12cbc5b1 (diff)
downloadchawan-94ca8979ffddda23c645c80ff32ae708206bf94b.tar.gz
Do not display password on status line
Editing the URL still does.
Diffstat (limited to 'src/types')
-rw-r--r--src/types/url.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index fd1aa201..f86bdc01 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -815,13 +815,13 @@ func serialize_unicode_dos*(path: UrlPath): string {.inline.} =
     result &= percentDecode(s)
     inc i
 
-func serialize*(url: Url, excludefragment = false): string =
+func serialize*(url: Url, excludefragment = false, excludepassword = false): string =
   result = url.scheme & ':'
   if url.host.issome:
     result &= "//"
     if url.includes_credentials:
       result &= url.username
-      if url.password != "":
+      if not excludepassword and url.password != "":
         result &= ':' & url.password
       result &= '@'
     result &= url.host.get.serialize