diff --git a/changelog/unreleased/fix-appprovider-panic.md b/changelog/unreleased/fix-appprovider-panic.md new file mode 100644 index 0000000000..c54408b65a --- /dev/null +++ b/changelog/unreleased/fix-appprovider-panic.md @@ -0,0 +1,4 @@ +Bugfix: Avoid AppProvider panic + +avoid panic in app provider +https://github.com/cs3org/reva/pull/3394 diff --git a/pkg/app/provider/wopi/wopi.go b/pkg/app/provider/wopi/wopi.go index 583fec374a..cb8e7d11a7 100644 --- a/pkg/app/provider/wopi/wopi.go +++ b/pkg/app/provider/wopi/wopi.go @@ -399,6 +399,9 @@ func parseWopiDiscovery(body io.Reader) (map[string]map[string]string, error) { return nil, err } root := doc.SelectElement("wopi-discovery") + if root == nil { + return nil, errors.New("wopi-discovery response malformed") + } for _, netzone := range root.SelectElements("net-zone") {