Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
noplanman
Poduptime
Commits
0f99bcbe
Commit
0f99bcbe
authored
Apr 29, 2020
by
dmorley
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'json-fixes' into 'develop'
fix for bad nodeinfo See merge request
diasporg/Poduptime!253
parents
14d342cc
c6d9c079
Pipeline
#4790
failed with stage
in 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
db/update.php
db/update.php
+6
-2
No files found.
CHANGELOG.md
View file @
0f99bcbe
...
...
@@ -17,6 +17,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Deprecated
### Removed
### Fixed
-
nodeinfo that does not follow the spec will lower score
### Security
## [2.6.3]
...
...
db/update.php
View file @
0f99bcbe
...
...
@@ -146,11 +146,15 @@ foreach ($pods as $pod) {
$jsonssl
=
json_decode
(
$outputssl
?:
''
);
if
(
$jsonssl
!==
null
)
{
$version
=
$jsonssl
->
software
->
version
??
0
;
$version
=
$jsonssl
->
software
->
version
??
'999.999.999'
;
if
(
$version
==
'999.999.999'
)
{
//if nodeinfo has no version info then mark invalid
$score
-=
2
;
}
preg_match_all
(
'((?:\d(.|-)?)+(\.)\d+\.*)'
,
$version
,
$sversion
);
$shortversion
=
$sversion
[
0
][
0
]
??
'0.0.0.0'
;
$signup
=
(
$jsonssl
->
openRegistrations
??
false
)
===
true
;
$softwarename
=
strtolower
(
$jsonssl
->
software
->
name
)
??
'unknown'
;
$softwarename
=
$jsonssl
->
software
->
name
?
strtolower
(
$jsonssl
->
software
->
name
)
:
'unknown'
;
$name
=
$jsonssl
->
metadata
->
nodeName
??
$softwarename
;
//dirty hack for badnodeinfo, this complains a lot, not a good fix.
$total_users
=
isset
(
$jsonssl
->
usage
->
users
->
total
)
?
$jsonssl
->
usage
->
users
->
total
:
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment