mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
PR to fix: Disallow line breaks in display names (#12380)
* Update settings.json * Update index.js * Update validation.js * Update validation.js * Update validation.js Removes the second check * Update tests and validation Added tests, and updated validation
This commit is contained in:
@@ -92,6 +92,14 @@ describe('PUT /user', () => {
|
||||
error: 'BadRequest',
|
||||
message: t('displaynameIssueSlur'),
|
||||
});
|
||||
|
||||
await expect(user.put('/user', {
|
||||
'profile.name': 'namecontainsnewline\n',
|
||||
})).to.eventually.be.rejected.and.eql({
|
||||
code: 400,
|
||||
error: 'BadRequest',
|
||||
message: t('displaynameIssueNewline'),
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user