From a4cd1b4c1d8d7b56c95d94488e740b1be0cb74cd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Mar 2022 10:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/login/LoginDialog.js | 4 ++-- src/modules/user/LoginRegisterComponent.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index e37976e45..d5e01f858 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 db369458b..8a677e6c6 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) {