You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
The fix corrects the problem that was reported and the format of numbers with the type integer are correctly validated.
However, the opposite is now a problem—the format of a “number” of type string is not correctly validated.
This behavior can be confirmed with the following tests.
describe('uint32_string',()=>{constuint32StringSchema={
...baseSchema,properties: {height: {type: 'string',format: 'uint32',},},};it('should validate a correct uint32',()=>{expect(()=>validator.validate(uint32StringSchema,{height: "8"})).not.toThrow();});it('should throw for a negative number',()=>{expect(()=>validator.validate(uint32StringSchema,{height: "-1"})).toThrow();});it('should throw when the number is too big',()=>{expect(()=>validator.validate(uint32StringSchema,{height: "4294967296"})).toThrow();});});
Which version(s) does this affect? (Environment, OS, etc...)
6.0.0-beta.7
The text was updated successfully, but these errors were encountered:
Description
Unresolved in PR #8743.
The fix corrects the problem that was reported and the format of numbers with the type integer are correctly validated.
However, the opposite is now a problem—the format of a “number” of type string is not correctly validated.
One example of where this happens in the code is shown in the figure below (more examples may exist).
https://github.com/LiskHQ/lisk-sdk/blob/release/6.0.0/framework/src/modules/reward/schemas.ts#L59-L69
This behavior can be confirmed with the following tests.
Which version(s) does this affect? (Environment, OS, etc...)
6.0.0-beta.7
The text was updated successfully, but these errors were encountered: