Bug in WordLists class - dictionary words containing spaces

15 views
Skip to first unread message

max.s...@york.ac.uk

unread,
Jul 29, 2013, 9:59:01 AM7/29/13
to vt-middle...@googlegroups.com
Hi,

I'm looking to use vt-password and vt-dictionary in a password strength checker. I'm using a DictionaryRule to match against a list of common passwords and have hit a snag as some of the passwords in the list start or end with spaces. The code that reads wordlists from a file in edu.vt.middleware.dictionary.WordLists.createFromReader() calls trim() on each line it reads. This strips any trailing and leading spaces from the passwords and therefore prevents me from using all the passwords in the list. Furthermore, trimming lines as they are read causes the code to throw exceptions when checking that the file is sorted correctly, as the checks are done after spaces have been trimmed.

Is this a bug or am I doing something wrong?

Thanks,

Max Spicer

Daniel Fisher

unread,
Jul 29, 2013, 11:57:19 AM7/29/13
to vt-middle...@googlegroups.com
Hello Max,
could you provide a sample of your word list that illustrates this problem?
Thanks.

--Daniel Fisher
 

Max Spicer

unread,
Jul 29, 2013, 12:11:04 PM7/29/13
to vt-middle...@googlegroups.com
Hi,

I've attached the first ten lines from my word list. The first entry (' Man') begins with a space, which gets trimmed. Because this space is trimmed, that common password is effectively ignored. Additionally, the sort order is changed as 'Man' sorts much lower down than ' Man' so the sort order checks in ArrayWordList.java fail.

The full word list is at http://--!!untrusted-link!!--securityoverride.org/infusions/pro_download_panel/download.php?did=66 I can't vouch for that site, so be careful!

For now, I've worked around this issue by reading the file myself and building my own ArrayWordList.

Thanks,

Max


--
 
---
You received this message because you are subscribed to the Google Groups "vt-middleware-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vt-middleware-u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

sample.txt

Daniel Fisher

unread,
Jul 30, 2013, 10:17:43 AM7/30/13
to vt-middle...@googlegroups.com
On Mon, Jul 29, 2013 at 12:11 PM, Max Spicer <max.s...@york.ac.uk> wrote:
Hi,

I've attached the first ten lines from my word list. The first entry (' Man') begins with a space, which gets trimmed. Because this space is trimmed, that common password is effectively ignored. Additionally, the sort order is changed as 'Man' sorts much lower down than ' Man' so the sort order checks in ArrayWordList.java fail.

The full word list is at http://--!!untrusted-link!!--securityoverride.org/infusions/pro_download_panel/download.php?did=66 I can't vouch for that site, so be careful!

For now, I've worked around this issue by reading the file myself and building my own ArrayWordList.

Created https://code.google.com/p/vt-middleware/issues/detail?id=181 to track this.

--Daniel Fisher

Reply all
Reply to author
Forward
0 new messages