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;
|
let user;
|
||||||
try {
|
try {
|
||||||
user = await Data.getUserByUsername({ username: req.body.data.username });
|
user = await Data.getUserByUsername({
|
||||||
|
username: req.body.data.username.toLowerCase(),
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ export default async (req, res) => {
|
|||||||
const user = await Data.createUser({
|
const user = await Data.createUser({
|
||||||
password: triple,
|
password: triple,
|
||||||
salt,
|
salt,
|
||||||
username: req.body.data.username,
|
username: req.body.data.username.toLowerCase(),
|
||||||
data: {
|
data: {
|
||||||
photo: "https://slate.host/static/a1.jpg",
|
photo: "https://slate.host/static/a1.jpg",
|
||||||
settings_deals_auto_approve: false,
|
settings_deals_auto_approve: false,
|
||||||
|
@ -105,7 +105,7 @@ export default class SceneSignIn extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const response = await this.props.onAuthenticate({
|
const response = await this.props.onAuthenticate({
|
||||||
username: this.state.username,
|
username: this.state.username.toLowerCase(),
|
||||||
password: this.state.password,
|
password: this.state.password,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user