if (error.status === 403) {
errorMessage = `Cannot retrieve OAuth Client credentials: ${error.text}. \n`
- errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), in particular the "webserver" section.'
+ errorMessage += 'Ensure you have correctly configured PeerTube (config/ directory), ' +
+ 'in particular the "webserver" section.'
}
// We put a bigger timeout
const RATES_LIMIT = {
LOGIN: {
WINDOW_MS: 5 * 60 * 1000, // 5 minutes
- MAX: 10 // 10 attempts
+ MAX: 15 // 15 attempts
}
}
import './videos/services'
import './server/email'
import './server/config'
+import './server/reverse-proxy'
it('Should rate limit logins', async function () {
const user = { username: 'root', password: 'fail' }
- for (let i = 0; i < 9; i++) {
+ for (let i = 0; i < 14; i++) {
await userLogin(server, user, 400)
}