Modify ↓
Opened 10 years ago
Closed 10 years ago
#12044 closed defect (fixed)
htdigest appends newlines
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.5 |
Component: | contrib | Version: | |
Severity: | normal | Keywords: | htdigest |
Cc: | Branch: | ||
Release Notes: |
Fixed |
||
API Changes: | |||
Internal Changes: |
Description
$./contrib/htdigest.py -cb htdigest trac user1 user1 $cat htdigest user1:trac:f21b2f8c5abd6baaeb3ffc28dce30e7c $./contrib/htdigest.py -b htdigest trac user2 user2 $cat htdigest user1:trac:f21b2f8c5abd6baaeb3ffc28dce30e7c user2:trac:97a40f5b8d13962839f664534aa573ef $./contrib/htdigest.py -b htdigest trac user3 user3 $cat htdigest user1:trac:f21b2f8c5abd6baaeb3ffc28dce30e7c user2:trac:97a40f5b8d13962839f664534aa573ef user3:trac:2becdbd941526ac9d618dd22a6b56241 $./contrib/htdigest.py -b htdigest trac user4 user4 $cat htdigest user1:trac:f21b2f8c5abd6baaeb3ffc28dce30e7c user2:trac:97a40f5b8d13962839f664534aa573ef user3:trac:2becdbd941526ac9d618dd22a6b56241 user4:trac:817bb1e53812c8111abc197aac2d4aca
Attachments (0)
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Proposed changes were incorrect, due to incorrect cherry-pick I suppose. Proposed change is to just strip off the newline before writing with a newline. On trunk the change is:
diff --git a/contrib/htdigest.py b/contrib/htdigest.py index b992c99..f82d49d 100755 --- a/contrib/htdigest.py +++ b/contrib/htdigest.py @@ -86,7 +86,7 @@ else: print(get_digest(prefix, password)) matched = True else: - print(line) + print(line.rstrip()) if not matched: with open(filename, 'a') as f: print(get_digest(prefix, password), file=f)
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:5 by , 10 years ago
Milestone: | 0.12.7 → 1.1.5 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
On further investigation, this is a regression introduced in [12788]. The trailing ,
on the print
statement prevented appending a newline (SO:18908905/121694).
Fixed on trunk in [14026].
Note:
See TracTickets
for help on using tickets.
Proposed changes in log:rjollos.git:t12044.