less loops with lesspipe on RAR archive files with header encrypted

Bug #565534 reported by Simone F.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Invalid
Undecided
Unassigned
less (Ubuntu)
New
Undecided
Unassigned
Nominated for Lucid by Simone F.

Bug Description

Binary package hint: less

lesspipe hangs probably in loop when a RAR archive is encrypted in its headers (see attachment or `rar a -hppassword arkNOT.rar file`)

simple solution:
--- lesspipe 2010-04-17 20:59:08.000000000 +0200
+++ lesspipeFIXRAR 2010-04-17 20:46:56.249990602 +0200
@@ -164,8 +164,8 @@
                                else echo "No pdftotext available"; fi ;;

                        *.rar|*.r[0-9][0-9])
- if [ -x "`which rar`" ]; then rar v "$1"
- elif [ -x "`which unrar`" ]; then unrar v "$1"
+ if [ -x "`which rar`" ]; then rar v -p- "$1"
+ elif [ -x "`which unrar`" ]; then unrar v -p- "$1"
                                else echo "No rar or unrar available"; fi ;;

                        *.rpm)

which will output none of the archive contents if the archive is fully encrypted (also header as per example file)
the output will be like:
RAR 3.90 beta 2 Copyright (c) 1993-2009 Alexander Roshal 3 Jun 2009
Shareware version Type RAR -? for help

/home/tst/SVN/arkNOT.rar (END)
At least it does not hang the shell terminal.

Good solution may be to always ask for password for RAR and then pass it to rar/unrar via the -p swithch (in case user pass null password on input then it would be -p-)

Revision history for this message
Simone F. (fittabile) wrote :
Revision history for this message
Vish (vish) wrote :

Thank you for bringing this bug to our attention. However, a paper cut should be a small usability issue, in the default Ubuntu install, that affects many people and is quick and easy to fix. So this bug can't be addressed as part of this project.

- This is a bug and not a papercut
For further information about papercuts criteria, please read https://wiki.ubuntu.com/PaperCut.

Don't worry though, this bug has been marked as "Invalid" only in the papercuts project.

Changed in hundredpapercuts:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.