Skip to content

Commit 32384aa

Browse files
wkloucekbutonic
authored andcommitted
unprotected ocs config endpoint (#2503)
* remove protection from ocs config endpoint * remove passing ocs config test from expected failures
1 parent 27b3091 commit 32384aa

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Bugfix: Remove the protection from /v?.php/config endpoints
2+
3+
We've removed the protection from the "/v1.php/config" and "/v2.php/config" endpoints
4+
to be API compatible with ownCloud 10.
5+
6+
https://github.com/cs3org/reva/issues/2503
7+
https://github.com/owncloud/ocis/issues/1338
8+

internal/http/services/owncloud/ocs/ocs.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ func (s *svc) Close() error {
8484
}
8585

8686
func (s *svc) Unprotected() []string {
87-
return []string{}
87+
return []string{
88+
"/v1.php/config",
89+
"/v2.php/config",
90+
}
8891
}
8992

9093
func (s *svc) routerInit() error {

tests/acceptance/expected-failures-on-EOS-storage.md

-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@
6868
### [no command equivalent to occ](https://github.com/owncloud/ocis/issues/1317)
6969
- [apiMain/status.feature:5](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/status.feature#L5)
7070

71-
### [ocs config endpoint only accessible by authorized users](https://github.com/owncloud/ocis/issues/1338)
7271
### [HTTP 401 Unauthorized responses don't contain a body](https://github.com/owncloud/ocis/issues/1337)
7372
- [apiAuthOcs/ocsDELETEAuth.feature:9](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsDELETEAuth.feature#L9)
7473
- [apiAuthOcs/ocsGETAuth.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L10)
75-
- [apiAuthOcs/ocsGETAuth.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L33)
7674
- [apiAuthOcs/ocsGETAuth.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L53)
7775
- [apiAuthOcs/ocsGETAuth.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L88)
7876
- [apiAuthOcs/ocsGETAuth.feature:121](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L121)

tests/acceptance/expected-failures-on-OCIS-storage.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -828,12 +828,10 @@ API, search, favorites, config, capabilities, not existing endpoints, CORS and o
828828

829829
#### [Different version, edition and productname in status request and capabilities request](https://github.com/owncloud/ocis/issues/2174)
830830
- [apiMain/status.feature:5](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/status.feature#L5) Scenario: Status.php is correct
831-
#### [ocs config endpoint only accessible by authorized users](https://github.com/owncloud/ocis/issues/1338)
832831

833832
#### [Ability to return error messages in Webdav response bodies](https://github.com/owncloud/ocis/issues/1293)
834833
- [apiAuthOcs/ocsDELETEAuth.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsDELETEAuth.feature#L10) Scenario: send DELETE requests to OCS endpoints as admin with wrong password
835834
- [apiAuthOcs/ocsGETAuth.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L10) Scenario: using OCS anonymously
836-
- [apiAuthOcs/ocsGETAuth.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L33) Scenario: ocs config end point accessible by unauthorized users
837835
- [apiAuthOcs/ocsGETAuth.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L53) Scenario: using OCS with non-admin basic auth
838836
- [apiAuthOcs/ocsGETAuth.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L88) Scenario: using OCS as normal user with wrong password
839837
- [apiAuthOcs/ocsGETAuth.feature:121](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L121) Scenario:using OCS with admin basic auth
@@ -1045,7 +1043,7 @@ Scenario Outline: A disabled user cannot use webdav
10451043
- [apiCapabilities/capabilities.feature:737](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L737)
10461044
- [apiCapabilities/capabilities.feature:766](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L766)
10471045
- [apiCapabilities/capabilities.feature:795](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L795)
1048-
- [apiCapabilities/capabilities.feature:827](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L827)
1046+
- [apiCapabilities/capabilities.feature:827](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L827)
10491047
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:25](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L25)
10501048
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:26](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L26)
10511049
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L44)
@@ -1309,4 +1307,3 @@ _ocs: api compatibility, return correct status code_
13091307

13101308
Note: always have an empty line at the end of this file.
13111309
The bash script that processes this file may not process a scenario reference on the last line.
1312-

tests/acceptance/expected-failures-on-S3NG-storage.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,10 @@ API, search, favorites, config, capabilities, not existing endpoints, CORS and o
845845

846846
#### [Different version, edition and productname in status request and capabilities request](https://github.com/owncloud/ocis/issues/2174)
847847
- [apiMain/status.feature:5](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiMain/status.feature#L5) Scenario: Status.php is correct
848-
#### [ocs config endpoint only accessible by authorized users](https://github.com/owncloud/ocis/issues/1338)
849848

850849
#### [Ability to return error messages in Webdav response bodies](https://github.com/owncloud/ocis/issues/1293)
851850
- [apiAuthOcs/ocsDELETEAuth.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsDELETEAuth.feature#L10) Scenario: send DELETE requests to OCS endpoints as admin with wrong password
852851
- [apiAuthOcs/ocsGETAuth.feature:10](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L10) Scenario: using OCS anonymously
853-
- [apiAuthOcs/ocsGETAuth.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L33) Scenario: ocs config end point accessible by unauthorized users
854852
- [apiAuthOcs/ocsGETAuth.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L53) Scenario: using OCS with non-admin basic auth
855853
- [apiAuthOcs/ocsGETAuth.feature:88](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L88) Scenario: using OCS as normal user with wrong password
856854
- [apiAuthOcs/ocsGETAuth.feature:121](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiAuthOcs/ocsGETAuth.feature#L121) Scenario:using OCS with admin basic auth
@@ -1062,7 +1060,7 @@ Scenario Outline: A disabled user cannot use webdav
10621060
- [apiCapabilities/capabilities.feature:737](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L737)
10631061
- [apiCapabilities/capabilities.feature:766](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L766)
10641062
- [apiCapabilities/capabilities.feature:795](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L795)
1065-
- [apiCapabilities/capabilities.feature:827](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L827)
1063+
- [apiCapabilities/capabilities.feature:827](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiCapabilities/capabilities.feature#L827)
10661064
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:25](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L25)
10671065
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:26](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L26)
10681066
- [apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature:44](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareCreateSpecialToShares1/createShareWhenExcludedFromSharing.feature#L44)
@@ -1310,4 +1308,3 @@ _ocs: api compatibility, return correct status code_
13101308

13111309
Note: always have an empty line at the end of this file.
13121310
The bash script that processes this file may not process a scenario reference on the last line.
1313-

0 commit comments

Comments
 (0)