Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit 33c2e55

Browse files
committed
Tweak token detection pattern to accomodate for empty fields
1 parent cb9367a commit 33c2e55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/wpxf/wordpress/hash_dump.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def dump_and_parse_hashes
145145

146146
until eof
147147
res = execute_hashdump_request
148-
break unless res.body.match?(/#{bof_token}\:(.+?)\:#{eof_token}/)
148+
break unless res.body.match?(/#{bof_token}\:(.*?)\:#{eof_token}/)
149149

150150
hash = parse_hashdump_body(res.body)
151151
hashes.push([hash[0][0], hash[0][1]]) if hash
@@ -200,7 +200,7 @@ def determine_prefix
200200
return nil unless reveals_one_row_per_request
201201

202202
# If the bof and eof tokens weren't found at all, there are no more rows available.
203-
return nil unless res.body.match?(/#{bof_token}\:(.+?)\:#{eof_token}/)
203+
return nil unless res.body.match?(/#{bof_token}\:(.*?)\:#{eof_token}/)
204204

205205
# If the tokens were found, then we can try to query another row.
206206
@current_row += 1

0 commit comments

Comments
 (0)