Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove the requirement to authenticate for /admin/server_version. #5122

Merged
merged 3 commits into from
May 7, 2019

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented May 1, 2019

This endpoint isn't much use for its intended purpose if you first need to
get yourself an admin's auth token.

I've restricted it to the /_synapse/admin path to make it a bit easier to
lock down for those concerned about exposing this information. I don't
imagine anyone is using it in anger currently.

Based on #5120.

@richvdh richvdh requested a review from a team May 1, 2019 19:01
@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #5122 into develop will decrease coverage by 0.04%.
The diff coverage is 42.42%.

@@             Coverage Diff             @@
##           develop    #5122      +/-   ##
===========================================
- Coverage    61.69%   61.65%   -0.05%     
===========================================
  Files          336      335       -1     
  Lines        34551    34500      -51     
  Branches      5674     5669       -5     
===========================================
- Hits         21317    21270      -47     
+ Misses       11706    11704       -2     
+ Partials      1528     1526       -2

@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #5122 into develop will decrease coverage by 0.01%.
The diff coverage is 80%.

@@             Coverage Diff             @@
##           develop    #5122      +/-   ##
===========================================
- Coverage    61.69%   61.68%   -0.02%     
===========================================
  Files          336      336              
  Lines        34551    34549       -2     
  Branches      5674     5674              
===========================================
- Hits         21317    21312       -5     
- Misses       11706    11708       +2     
- Partials      1528     1529       +1

This endpoint isn't much use for its intended purpose if you first need to get
yourself an admin's auth token.

I've restricted it to the `/_synapse/admin` path to make it a bit easier to
lock down for those concerned about exposing this information. I don't imagine
anyone is using it in anger currently.
@richvdh richvdh merged commit 59e2d26 into develop May 7, 2019
@richvdh richvdh deleted the rav/deauth_versions branch May 7, 2019 08:29
anoadragon453 added a commit that referenced this pull request May 10, 2019
* develop: (45 commits)
  URL preview blacklisting fixes (#5155)
  Revert 085ae34
  Add a DUMMY stage to captcha-only registration flow
  Make Prometheus snippet less confusing on the metrics collection doc (#4288)
  Set syslog identifiers in systemd units (#5023)
  Run Black on the tests again (#5170)
  Add AllowEncodedSlashes to apache (#5068)
  remove instructions for jessie installation (#5164)
  Run `black` on per_destination_queue
  Limit the number of EDUs in transactions to 100 as expected by receiver (#5138)
  Fix bogus imports in tests (#5154)
  add options to require an access_token to GET /profile and /publicRooms on CS API (#5083)
  Do checks on aliases for incoming m.room.aliases events (#5128)
  Remove the requirement to authenticate for /admin/server_version. (#5122)
  Fix spelling in server notices admin API docs (#5142)
  Fix sample config
  0.99.3.2
  include disco in deb build target list
  changelog
  Debian: we now need libpq-dev.
  ...
@RicoNosa
Copy link

RicoNosa commented May 22, 2019

So, since 0.99.4 the API should be here /_synapse/admin/v1/server_version and doesn't require admin token right ?
It was working fine with the old path in 0.99.3.2 (+admin token)
But now I get the nginx 404 not found page.

`<html>
    <head>
        <title>404 Not Found</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>404 Not Found</h1>
        </center>
        <hr>
        <center>nginx/1.10.3</center>
    </body>
</html>`

Tried :

  • old path + token
  • old path without token
  • new path + token
  • new path without token

Plus,
While /_matrix/client/r0/admin/whois/ is still working, /_synapse/admin/v1/whois/ is not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants