Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
f319660f
Unverified
Commit
f319660f
authored
4 years ago
by
Joas Schilling
Browse files
Options
Downloads
Patches
Plain Diff
Force run the verification of the signature on occ
Signed-off-by:
Joas Schilling
<
coding@schilljs.com
>
parent
6d291c3c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/Command/Integrity/CheckApp.php
+1
-1
1 addition, 1 deletion
core/Command/Integrity/CheckApp.php
lib/private/IntegrityCheck/Checker.php
+7
-4
7 additions, 4 deletions
lib/private/IntegrityCheck/Checker.php
with
8 additions
and
5 deletions
core/Command/Integrity/CheckApp.php
+
1
−
1
View file @
f319660f
...
...
@@ -70,7 +70,7 @@ class CheckApp extends Base {
protected
function
execute
(
InputInterface
$input
,
OutputInterface
$output
):
int
{
$appid
=
$input
->
getArgument
(
'appid'
);
$path
=
(
string
)
$input
->
getOption
(
'path'
);
$result
=
$this
->
checker
->
verifyAppSignature
(
$appid
,
$path
);
$result
=
$this
->
checker
->
verifyAppSignature
(
$appid
,
$path
,
true
);
$this
->
writeArrayInOutputFormat
(
$input
,
$output
,
$result
);
if
(
count
(
$result
)
>
0
)
{
return
1
;
...
...
This diff is collapsed.
Click to expand it.
lib/private/IntegrityCheck/Checker.php
+
7
−
4
View file @
f319660f
...
...
@@ -311,12 +311,13 @@ class Checker {
* @param string $signaturePath
* @param string $basePath
* @param string $certificateCN
* @param bool $forceVerify
* @return array
* @throws InvalidSignatureException
* @throws \Exception
*/
private
function
verify
(
string
$signaturePath
,
string
$basePath
,
string
$certificateCN
):
array
{
if
(
!
$this
->
isCodeCheckEnforced
())
{
private
function
verify
(
string
$signaturePath
,
string
$basePath
,
string
$certificateCN
,
bool
$forceVerify
=
false
):
array
{
if
(
!
$forceVerify
&&
!
$this
->
isCodeCheckEnforced
())
{
return
[];
}
...
...
@@ -495,9 +496,10 @@ class Checker {
*
* @param string $appId
* @param string $path Optional path. If none is given it will be guessed.
* @param bool $forceVerify
* @return array
*/
public
function
verifyAppSignature
(
string
$appId
,
string
$path
=
''
):
array
{
public
function
verifyAppSignature
(
string
$appId
,
string
$path
=
''
,
bool
$forceVerify
=
false
):
array
{
try
{
if
(
$path
===
''
)
{
$path
=
$this
->
appLocator
->
getAppPath
(
$appId
);
...
...
@@ -505,7 +507,8 @@ class Checker {
$result
=
$this
->
verify
(
$path
.
'/appinfo/signature.json'
,
$path
,
$appId
$appId
,
$forceVerify
);
}
catch
(
\Exception
$e
)
{
$result
=
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment