mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user