Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PolishCharacterData and PolishSequenceData #105

Merged
merged 1 commit into from Oct 17, 2019

Conversation

Wojtek120
Copy link
Contributor

@Wojtek120 Wojtek120 commented Oct 13, 2019

Just added character set and sequence data for Polish alphabet based on enums for English.

@dfish3r
Copy link
Member

@dfish3r dfish3r commented Oct 17, 2019

Thank you!

@dfish3r dfish3r merged commit f3f5754 into vt-middleware:master Oct 17, 2019
Alphabetical(
"ILLEGAL_ALPHABETICAL_SEQUENCE",
new CharacterSequence[] {new CharacterSequence("abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"),
new CharacterSequence("aąbcćdeęfghijklmnoópqrstuvwxyzźż", "AĄBCĆDEĘFGHIJKLMNOÓPQRSTUVWXYZŹŻ"), }),
Copy link
Member

@dfish3r dfish3r Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally include the English CharacterSequence data here?

Copy link
Contributor Author

@Wojtek120 Wojtek120 Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this increases security. Sometimes Polish characters are omitted in the alphabet. In addition, it is easier to attach one sequence date file than two separately.

On the other hand, to be completely correct in terms of names, it shouldn't be there.

Now I see that i forgot about one letter there, I'm making new pull request. Sorry for that.

Copy link
Member

@dfish3r dfish3r Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is better to use multiple rules and be explicit:

List<Rule> rules = new ArrayList<>();
rules.add(new IllegalSequenceRule(EnglishSequenceData.Alphabetical));
rules.add(new IllegalSequenceRule(PolishSequenceData.Alphabetical));

See 72621c0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants