Skip to content

Commit

Permalink
Correctly check for slashes in domainjid parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Oct 10, 2018
1 parent f0fec92 commit c362664
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static String parseDomain(String jid) {

int atIndex = jid.indexOf('@');
int slashIndex = jid.indexOf('/');
if (slashIndex > 0) {
if (slashIndex >= 0) {
// 'local@domain.foo/resource' and 'local@domain.foo/res@otherres' case
if (slashIndex > atIndex) {
return jid.substring(atIndex + 1, slashIndex);
Expand Down

0 comments on commit c362664

Please sign in to comment.