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

Correctly validate maxInclusive datatypes #1186

Conversation

austinmatherne-wk
Copy link
Contributor

Reason for change

The max values used for byte, unsignedByte, short, unsignedShort datatypes were all one too low. The facets for these datatypes are maxInclusive not maxExclusive.

byte

byte is ·derived· from short by setting the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128. The ·base type· of byte is short.

unsignedByte

unsignedByte is ·derived· from unsignedShort by setting the value of ·maxInclusive· to be 255. The ·base type· of unsignedByte is unsignedShort.

short

short is ·derived· from int by setting the value of ·maxInclusive· to be 32767 and ·minInclusive· to be -32768. The ·base type· of short is int.

unsignedShort

unsignedShort is ·derived· from unsignedInt by setting the value of ·maxInclusive· to be 65535. The ·base type· of unsignedShort is unsignedInt.

Description of change

Use maxInclusive checks for byte, unsignedByte, short, and unsignedShort.

Steps to Test

CI

review:
@Arelle/arelle

The max values used for `byte`, `unsignedByte`, `short`, `unsignedShort`
types were all one too low. The schema restrictions for these datatypes
are maxInclusive.
@aviary3-wk
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Copy link
Contributor

@stevenbronson-wk stevenbronson-wk left a comment

Choose a reason for hiding this comment

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

Looks like this fixes #929.

@stevenbronson-wk stevenbronson-wk merged commit f06d948 into Arelle:master Apr 29, 2024
179 checks passed
@austinmatherne-wk austinmatherne-wk deleted the xml-schema-datatype-validation branch April 29, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Resolved
Development

Successfully merging this pull request may close these issues.

None yet

4 participants