mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
better signature validation
This commit is contained in:
1 parent
8cb74e0bcc
commit
8d3295e125
2 files changed
+22
-3
No files matched your search
@@ -14,4 +14,12 @@ module ImageUtils
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
def error?(image)
|
||||
image = image.crop(0, 0, image.width / 4, 2)
|
||||
|
||||
row1, row2 = image.to_a
|
||||
|
||||
row1[3..] == row2[..-4] && row1.each_cons(2).none? { |a, b| a == b }
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user