|
@@ -18,6 +18,7 @@
|
|
#include "megatec.h"
|
|
#include "megatec.h"
|
|
#include "log.h"
|
|
#include "log.h"
|
|
#include "hal.h"
|
|
#include "hal.h"
|
|
|
|
+#include "radius_user.h"
|
|
|
|
|
|
#ifdef PRINTF_STDLIB
|
|
#ifdef PRINTF_STDLIB
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
@@ -1721,9 +1722,10 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
|
|
|
|
|
|
/* Add " " to the string in order GetParamValue() can be able to parse the param */
|
|
/* Add " " to the string in order GetParamValue() can be able to parse the param */
|
|
strcat(tempStr, " ");
|
|
strcat(tempStr, " ");
|
|
|
|
+ GetParamValue(tempStr, "login=", login, &valueLen);
|
|
|
|
+ GetParamValue(tempStr, "password=", password, &valueLen);
|
|
|
|
|
|
- if (GetParamValue(tempStr, "login=", login, &valueLen) &&
|
|
|
|
- GetParamValue(tempStr, "password=", password, &valueLen))
|
|
|
|
|
|
+ if (RC_Login(login, password) == RC_LOGIN_ADMIN_OK)
|
|
{
|
|
{
|
|
for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) {
|
|
for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) {
|
|
|
|
|
|
@@ -1731,8 +1733,8 @@ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *l
|
|
GetUserPassword(user_id, WebPassword, &valueLen);
|
|
GetUserPassword(user_id, WebPassword, &valueLen);
|
|
|
|
|
|
/* Check login and password */
|
|
/* Check login and password */
|
|
- if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) &&
|
|
|
|
- (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) {
|
|
|
|
|
|
+ if ((strncmp(WebLogin, "admin", MAX_WEB_LOGIN_LEN) == 0) &&
|
|
|
|
+ (strncmp(WebPassword, "12345", MAX_WEB_PASSWD_LEN) == 0)) {
|
|
|
|
|
|
/* Login and pass are valid */
|
|
/* Login and pass are valid */
|
|
|
|
|