mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 19:32:26 -05:00
[bugfix] Use punycode for host part of resource query param when doing webfinger requests (#3133)
* [bugfix] use punycode when webfingering * account for punycode when checking if final URI matches expected * hmm * fix test
This commit is contained in:
parent
8ab2b19a94
commit
ecfea10e35
7 changed files with 239 additions and 13 deletions
|
|
@ -42,6 +42,18 @@ func (suite *FingerTestSuite) TestFinger() {
|
|||
suite.Equal(0, wc.Len(), "expect webfinger cache to be empty for normal webfinger request")
|
||||
}
|
||||
|
||||
func (suite *FingerTestSuite) TestFingerPunycode() {
|
||||
wc := suite.state.Caches.Webfinger
|
||||
suite.Equal(0, wc.Len(), "expect webfinger cache to be empty")
|
||||
|
||||
_, err := suite.transport.Finger(context.TODO(), "brand_new_person", "pünycöde.example.org")
|
||||
if err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
suite.Equal(0, wc.Len(), "expect webfinger cache to be empty for normal webfinger request")
|
||||
}
|
||||
|
||||
func (suite *FingerTestSuite) TestFingerWithHostMeta() {
|
||||
wc := suite.state.Caches.Webfinger
|
||||
suite.Equal(0, wc.Len(), "expect webfinger cache to be empty")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue