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

feat: validate from uploaded file #4239

Merged
merged 101 commits into from
Jan 9, 2025
Merged
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
1002f10
refactor: convert try catch to promisse
vitormattos Jan 3, 2025
24a887a
fix: prevent to don't set loading to false when don't upload file
vitormattos Jan 3, 2025
7526749
refactor: convert to native typed properties
vitormattos Jan 3, 2025
11f16b1
fix: use UID as uppercase
vitormattos Jan 3, 2025
f900fa8
feat: store hash of signed file at database
vitormattos Jan 3, 2025
214f4c2
feat: add new endpoint to validate from uploaded file
vitormattos Jan 3, 2025
859df10
chore: update documentation
vitormattos Jan 3, 2025
92aa3dd
feat: update validation page to add validate from uploaded file
vitormattos Jan 3, 2025
07d39d3
fix: cs
vitormattos Jan 3, 2025
af51c3d
fix: ignore error
vitormattos Jan 3, 2025
054d0e5
chore: reorder methods and rename internal method
vitormattos Jan 3, 2025
d013ffb
chore: add new status
vitormattos Jan 3, 2025
16dd18c
fix: revert previous change
vitormattos Jan 3, 2025
9fa0910
fix: previous commit
vitormattos Jan 3, 2025
4dcdb18
refactor: change methods structure
vitormattos Jan 3, 2025
fb88965
fix: only need to get content from file when haven't a LibreSign file
vitormattos Jan 3, 2025
756263d
feat: add totalPages to return of validate method
vitormattos Jan 3, 2025
db12697
fix: remove request to validation API when load validation page
vitormattos Jan 3, 2025
0079f3c
fix: app id
vitormattos Jan 3, 2025
7e2f74d
fix: remove request to validation api when open validation page
vitormattos Jan 3, 2025
78d7ad1
chore: make possible use the class "extra" at other section scope
vitormattos Jan 3, 2025
9d5cb1f
chore: convert document name to list item
vitormattos Jan 3, 2025
574e4ec
feat: display total pages of a pdf file
vitormattos Jan 3, 2025
8dd6d5a
fix: revert previous commit
vitormattos Jan 3, 2025
04feb06
refactor: remove unecessary return
vitormattos Jan 3, 2025
a1dc48b
fix: var name
vitormattos Jan 3, 2025
97b9a22
refactor: reorganize method
vitormattos Jan 3, 2025
5322fc0
refactor: put two getFile together
vitormattos Jan 3, 2025
70e03c5
refactor: separate getFileContent into specialist method
vitormattos Jan 3, 2025
a139447
feat: display total size
vitormattos Jan 3, 2025
88e501a
chore: update documentation
vitormattos Jan 3, 2025
5e36f00
chore: rename method and reorganize class
vitormattos Jan 3, 2025
9da3b52
refactor: move metadata handlign to inside of secialist method
vitormattos Jan 3, 2025
1e18152
fix: error handler
vitormattos Jan 3, 2025
6e466ad
feat: add pdf version
vitormattos Jan 3, 2025
4922655
fix: method name was changed
vitormattos Jan 4, 2025
4eaf988
chore: remove settings from error message
vitormattos Jan 4, 2025
6b69aee
fix: only apply foreach if have signers
vitormattos Jan 4, 2025
4d55a5e
fix: only display signers if have signers
vitormattos Jan 4, 2025
23158c4
chore: display return button after upload a file to validate
vitormattos Jan 4, 2025
bdd0f32
feat: add new status
vitormattos Jan 4, 2025
d670959
refactor: move status list to a file
vitormattos Jan 4, 2025
1188551
chore: add docblock
vitormattos Jan 4, 2025
9f2dca5
chore: only display signers block if have a signer
vitormattos Jan 4, 2025
76d74dc
fix: linter
vitormattos Jan 4, 2025
df913af
feat: show status
vitormattos Jan 4, 2025
fe7f129
chore: handle exceptions
vitormattos Jan 4, 2025
5ccc0c6
chore: start to implement unit tests
vitormattos Jan 4, 2025
d0c4f6f
fix: necessary changes after implement unit tests
vitormattos Jan 4, 2025
5e0df8f
fix: this file wasnt signed and need to be a signed file
vitormattos Jan 4, 2025
caf2bc1
chore: test signed file outside LibrSign
vitormattos Jan 4, 2025
34c58b0
fix: cs fix
vitormattos Jan 4, 2025
2c8240b
fix: page dimension need to be the same of the file
vitormattos Jan 4, 2025
64eb253
fix: removed possible data collision
vitormattos Jan 4, 2025
dadf512
fix: linter
vitormattos Jan 4, 2025
a202339
chore: update documentation
vitormattos Jan 4, 2025
951e071
refactor: replace array by object
vitormattos Jan 4, 2025
4b4a869
chore: add pending data
vitormattos Jan 4, 2025
84d97c1
refactor: rename var
vitormattos Jan 5, 2025
e0ae879
chore: use only PHP to retrieve signature chains
vitormattos Jan 5, 2025
85f8b36
chore: only parse PDF when is necessary
vitormattos Jan 5, 2025
85fa5ab
chore: only parse PDF when is necessary
vitormattos Jan 5, 2025
0165354
feat: add signingTime to signer data
vitormattos Jan 6, 2025
5482ad2
feat: return sign_date from PDF file
vitormattos Jan 6, 2025
a1afbdb
refactor: moved logic to load or not a data to specialist methods
vitormattos Jan 6, 2025
b5b085d
chore: remove unecessary loop
vitormattos Jan 6, 2025
85f4531
fix: psalm
vitormattos Jan 6, 2025
9d40c21
chore: use CN as display name
vitormattos Jan 6, 2025
42f8153
feat: add subject (Common Name) to API response
vitormattos Jan 6, 2025
8757ac8
chore: convert to object oriented way and use a load method
vitormattos Jan 6, 2025
f5577ef
chore: move settings to fileData object
vitormattos Jan 6, 2025
7e0d572
fix: prevent error
vitormattos Jan 6, 2025
a90471e
fix: prevent error when the signature have issues
vitormattos Jan 6, 2025
9c257f3
chore: only show sign date when have this information
vitormattos Jan 6, 2025
123acf7
chore: get filename from uploaded file
vitormattos Jan 6, 2025
b681022
fix: get common name from subject
vitormattos Jan 6, 2025
5ddab9b
chore: change order to call method
vitormattos Jan 6, 2025
ed2e0fa
chore: remove unecessary condition
vitormattos Jan 6, 2025
4a7c25d
fix: key of signed data
vitormattos Jan 6, 2025
f0df1e1
chore: lazy load of content
vitormattos Jan 6, 2025
5437d73
fix: translate text
vitormattos Jan 6, 2025
28db566
feat: show issuer
vitormattos Jan 6, 2025
c9f14e3
feat: display hash algorithm
vitormattos Jan 6, 2025
afd602a
refactor: make more readdable
vitormattos Jan 6, 2025
68e317d
feat: add poppler-utils as fallback signature validator
vitormattos Jan 7, 2025
314285d
feat: implement loading to validate actions
vitormattos Jan 7, 2025
42057d5
fix: cs
vitormattos Jan 7, 2025
7e28dd6
fix: don't throw error when is not a LibreSign file
vitormattos Jan 7, 2025
90d8e65
fix: only remove loading when finish the validation
vitormattos Jan 7, 2025
de07b02
fix: linter
vitormattos Jan 7, 2025
dc5ecf4
fix: add name
vitormattos Jan 7, 2025
7702e1b
fix: linter
vitormattos Jan 7, 2025
f9d2346
chore: fallback to sign date
vitormattos Jan 7, 2025
f838355
chore: parse status text
vitormattos Jan 7, 2025
d361cfe
chore: indent certificate chain
vitormattos Jan 7, 2025
a489606
feat: implement poppler pdfsig configuration check
vitormattos Jan 7, 2025
f3975ae
fix: merge two results of parse
vitormattos Jan 8, 2025
784b751
chore: add poppler-utils at tests
vitormattos Jan 8, 2025
8563759
fix: typo
vitormattos Jan 8, 2025
821f43c
chore: mark validation test as skipped if haven't poppler-utils
vitormattos Jan 9, 2025
f091704
chore: remove unecessary dependency
vitormattos Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: change order to call method
This method trigger loadSigners internally, because this was moved to
the final of flow and also because the loadSigned could generate new
messages

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Jan 6, 2025
commit 5ddab9b7354a2c2cc7a0a2c8710fbd15ee6d3d66
2 changes: 1 addition & 1 deletion lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ public function toArray(): array {
$this->loadLibreSignData();
$this->loadFileMetadata();
$this->loadSettings();
$this->loadMessages();
$this->loadSigners();
$this->loadMessages();
$return = json_decode(json_encode($this->fileData), true);
ksort($return);
return $return;
Expand Down