mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 22:12:19 +03:00
usernames: enforce lowercase
This commit is contained in:
parent
6e0f82d99b
commit
47066916fa
@ -23,7 +23,9 @@ export default async (req, res) => {
|
||||
|
||||
let user;
|
||||
try {
|
||||
user = await Data.getUserByUsername({ username: req.body.data.username });
|
||||
user = await Data.getUserByUsername({
|
||||
username: req.body.data.username.toLowerCase(),
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export default async (req, res) => {
|
||||
const user = await Data.createUser({
|
||||
password: triple,
|
||||
salt,
|
||||
username: req.body.data.username,
|
||||
username: req.body.data.username.toLowerCase(),
|
||||
data: {
|
||||
photo: "https://slate.host/static/a1.jpg",
|
||||
settings_deals_auto_approve: false,
|
||||
|
@ -105,7 +105,7 @@ export default class SceneSignIn extends React.Component {
|
||||
}
|
||||
|
||||
const response = await this.props.onAuthenticate({
|
||||
username: this.state.username,
|
||||
username: this.state.username.toLowerCase(),
|
||||
password: this.state.password,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user