diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index e37976e4..d5e01f85 100644 --- a/src/modules/login/LoginDialog.js +++ b/src/modules/login/LoginDialog.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Redirect } from 'react-router'; +import { Base64 } from 'js-base64'; import Dialog, { DialogActions, @@ -372,7 +372,7 @@ class LoginDialog extends Component { let url = '/accounts/login.json' axios.post(url, { login: newloginValue, - password: newpassValue, + password: Base64.encode(newpassValue), autologin: isGoingValue } ).then((response) => { diff --git a/src/modules/user/LoginRegisterComponent.js b/src/modules/user/LoginRegisterComponent.js index db369458..8a677e6c 100644 --- a/src/modules/user/LoginRegisterComponent.js +++ b/src/modules/user/LoginRegisterComponent.js @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import {setmiyah,broadcastChannelPostMessage} from 'educoder'; import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd'; +import { Base64 } from 'js-base64'; import passopen from '../../../src/images/login/passopen.png'; import passoff from '../../../src/images/login/passoff.png'; import axios from 'axios'; @@ -350,7 +351,7 @@ class LoginRegisterComponent extends Component { var url = "/accounts/login.json"; axios.post(url, { login: this.state.login, - password: this.state.password, + password: Base64.encode(this.state.password), }).then((response) => { if (response === undefined) {