more discovery test
This commit is contained in:
parent
87dbe5e9fb
commit
a688bd1061
2 changed files with 134 additions and 91 deletions
|
|
@ -511,7 +511,7 @@ export class OAuth2ProviderService {
|
|||
|
||||
const clientUrl = validateClientId(clientId);
|
||||
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
if (process.env.NODE_ENV !== 'test' || process.env.MISSKEY_TEST_DISALLOW_LOOPBACK === '1') {
|
||||
const lookup = await dns.lookup(clientUrl.hostname);
|
||||
if (ipaddr.parse(lookup.address).range() === 'loopback') {
|
||||
throw new Error('client_id unexpectedly resolves to loopback IP.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue