Skip to content

Commit

Permalink
fix version for legacy clients
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed May 17, 2022
1 parent cbd7ea7 commit 23acf40
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 15 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix version number in status page

We needed to undo the version number changes on the status page to keep compatibility for legacy clients. We added a new field `productversion` for the actual version of the product.

https://github.com/owncloud/ocis/issues/3788
https://github.com/owncloud/ocis/pull/3805
5 changes: 3 additions & 2 deletions extensions/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,12 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
"installed": true,
"maintenance": false,
"needsDbUpgrade": false,
"version": version.Long(),
"versionstring": version.GetString(),
"version": version.Legacy,
"versionstring": version.LegacyString,
"edition": "Community",
"productname": "Infinite Scale",
"product": "Infinite Scale",
"productversion": version.GetString(),
"hostname": "",
},
"support_url_signing": true,
Expand Down
1 change: 1 addition & 0 deletions extensions/ocdav/pkg/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func Server(cfg *config.Config) *cli.Command {
ocdav.GatewaySvc(cfg.Reva.Address),
ocdav.JWTSecret(cfg.TokenManager.JWTSecret),
ocdav.ProductName(cfg.Status.ProductName),
ocdav.ProductVersion(cfg.Status.ProductVersion),
ocdav.Product(cfg.Status.Product),
ocdav.Version(cfg.Status.Version),
ocdav.VersionString(cfg.Status.VersionString),
Expand Down
11 changes: 6 additions & 5 deletions extensions/ocdav/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ type Auth struct {

// Status holds the configurable values for the status.php
type Status struct {
Version string
VersionString string
Product string
ProductName string
Edition string
Version string
VersionString string
Product string
ProductName string
ProductVersion string
Edition string
}
11 changes: 6 additions & 5 deletions extensions/ocdav/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ func DefaultConfig() *config.Config {
},
},
Status: config.Status{
Version: version.Long(),
VersionString: version.GetString(),
Product: "Infinite Scale",
ProductName: "Infinite Scale",
Edition: "Community",
Version: version.Legacy,
VersionString: version.LegacyString,
ProductVersion: version.GetString(),
Product: "Infinite Scale",
ProductName: "Infinite Scale",
Edition: "Community",
},
}
}
Expand Down
4 changes: 4 additions & 0 deletions extensions/proxy/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func DefaultPolicies() []config.Policy {
Endpoint: "/webdav/",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/status",
Service: "com.owncloud.web.ocdav",
},
{
Endpoint: "/status.php",
Service: "com.owncloud.web.ocdav",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/blevesearch/bleve_index_api v1.0.1
github.com/coreos/go-oidc/v3 v3.2.0
github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde
github.com/cs3org/reva/v2 v2.3.2-0.20220513093820-4f179b727de6
github.com/cs3org/reva/v2 v2.3.2-0.20220517104818-690fb7f13ef4
github.com/disintegration/imaging v1.6.2
github.com/go-chi/chi/v5 v5.0.7
github.com/go-chi/cors v1.2.1
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD9
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde h1:WrD9O8ZaWvsm0eBzpzVBIuczDhqVq50Nmjc7PGHHA9Y=
github.com/cs3org/go-cs3apis v0.0.0-20220412090512-93c5918b4bde/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.3.2-0.20220513093820-4f179b727de6 h1:SsL8/Uu/h8fYxi44iEg8MbziujeyVMZdwZECeaoMBww=
github.com/cs3org/reva/v2 v2.3.2-0.20220513093820-4f179b727de6/go.mod h1:uGeTncJa3FISh8AERkbZYVNXFV40PjYyRht5L09i+LQ=
github.com/cs3org/reva/v2 v2.3.2-0.20220517104818-690fb7f13ef4 h1:QPJPgsJtLcceFZn1GXZiotyp/fNxuf74gijwDJ/jU+o=
github.com/cs3org/reva/v2 v2.3.2-0.20220517104818-690fb7f13ef4/go.mod h1:uGeTncJa3FISh8AERkbZYVNXFV40PjYyRht5L09i+LQ=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
Expand Down Expand Up @@ -883,6 +883,8 @@ github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b h1:Q53idHrTuQD
github.com/maxymania/go-system v0.0.0-20170110133659-647cc364bf0b/go.mod h1:KirJrATYGbTyUwVR26xIkaipRqRcMRXBf8N5dacvGus=
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZyWckaLfucYG6KYOXLWo4co8pZYNY=
github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE=
github.com/micbar/reva/v2 v2.0.0-20220516113840-e3aec07a0336 h1:/N3Hw1x/28snGTVNV/eoU3gyfcp4ZHCjSxQj8fAa7Ls=
github.com/micbar/reva/v2 v2.0.0-20220516113840-e3aec07a0336/go.mod h1:uGeTncJa3FISh8AERkbZYVNXFV40PjYyRht5L09i+LQ=
github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 h1:M0R40eUlyqxMuZn3Knx4DJTwHE3TiPFzcWUA/BKtDMM=
github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
Expand Down
6 changes: 6 additions & 0 deletions ocis-pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ var (

// Date indicates the build date.
Date = time.Now().Format("20060102")

// Legacy defines the old long 4 number ownCloud version needed for some clients
Legacy = "10.11.0.0"

// LegacyString defines the old ownCloud version needed for some clients
LegacyString = "10.11.0"
)

// Compiled returns the compile time of this service.
Expand Down

0 comments on commit 23acf40

Please sign in to comment.