angular-complexify icon indicating copy to clipboard operation
angular-complexify copied to clipboard

Requesting feedback on correct interpretation of docs on banlist

Open Download opened this issue 10 years ago • 4 comments

jquery-complexify is currently behaving differently from the documentation in respect to loose and strict modes of working with the banlist. We are wondering whether the docs are wrong or the behavior. I'm hoping you will be able to give some feedback as to which is (should be) the correct interpretation.

The discussion is here: https://github.com/danpalmer/jquery.complexify.js/issues/31

Download avatar Jun 23 '15 09:06 Download

Same problem (but easy fix possible) Change:

            self.inBanlist = function(str) {
                for (var i = 0, c = options.bannedPasswords.length; i < c; i++) {
                    //line with problems incoming:
                    if (options.bannedPasswords[i].indexOf(str) !== -1) {
                        return true;
                    }
                }
                return false;
            };

to

            self.inBanlist = function(str) {
                for (var i = 0, c = options.bannedPasswords.length; i < c; i++) {
                    //fixed line incoming:
                    if (str.indexOf(options.bannedPasswords[i]) !== -1) {
                        return true;
                    }
                }
                return false;
            };

In addition you should update your blacklist, otherwise every password with a '0' drops to 0%, as 0 is on the blacklist ... (someone really hated 0 here :D )

chickahoona avatar Dec 06 '15 15:12 chickahoona

I've come to the conclusion that strict mode is unusable for me due to the current behavior.

Download avatar Dec 06 '15 16:12 Download

Repo is updated to the latest jQuery version. Strict mode is not perfect, I'll try to improve it soon.

Kraku avatar Dec 07 '15 21:12 Kraku

I have no gripes with angular-complexify, it's the implementation in complexify itself. Actually, the docs describe a very sensible solution, but the actual implementation is sort of 'greedy', matching way more than it should.

Download avatar Dec 08 '15 08:12 Download