Сборка REDL: панель на PHP 8, капча-тумблер, закрытые уязвимости, установщики в один клик
- панель работает на PHP 8.4 (оригинал под PHP 7.0): elFinder utf8_encode, apache_get_modules, warnings - капча выключена и управляется из админки (флаг captcha_enable + блок настроек) - закрыты две SQL-инъекции без авторизации (createAuthLog: пароль из POST и CF-Connecting-IP) - убрано хранение паролей в открытом виде в authlog, XSS в поле ref - установщики install-panel.sh и install-node.sh (оригинальный затирал sources.list репозиториями Debian 9) - современный Dockerfile (оригинальный на debian:stretch больше не собирается) - планировщик и автозапуск работают без systemd - брендинг REDL.IO, год 2026, ссылки на redl.io - документация на русском: ИЗМЕНЕНИЯ, БЕЗОПАСНОСТЬ, ИНСТРУКЦИЯ
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
// Class definition
|
||||
|
||||
var KTClipboardDemo = function () {
|
||||
|
||||
// Private functions
|
||||
var demos = function () {
|
||||
// basic example
|
||||
new ClipboardJS('[data-clipboard=true]').on('success', function(e) {
|
||||
e.clearSelection();
|
||||
alert('Ссылка успешно скопирована в буфер обмена!');
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
demos();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
KTClipboardDemo.init();
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,272 @@
|
||||
"use strict";
|
||||
|
||||
// Class Definition
|
||||
var KTLogin = function() {
|
||||
var _login;
|
||||
|
||||
var _showForm = function(form) {
|
||||
var cls = 'login-' + form + '-on';
|
||||
var form = 'kt_login_' + form + '_form';
|
||||
|
||||
_login.removeClass('login-forgot-on');
|
||||
_login.removeClass('login-signin-on');
|
||||
_login.removeClass('login-signup-on');
|
||||
|
||||
_login.addClass(cls);
|
||||
|
||||
KTUtil.animateClass(KTUtil.getById(form), 'animate__animated animate__backInUp');
|
||||
}
|
||||
|
||||
var _handleSignInForm = function() {
|
||||
var validation;
|
||||
|
||||
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
|
||||
validation = FormValidation.formValidation(
|
||||
KTUtil.getById('kt_login_signin_form'),
|
||||
{
|
||||
fields: {
|
||||
username: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Username is required'
|
||||
}
|
||||
}
|
||||
},
|
||||
password: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Password is required'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
submitButton: new FormValidation.plugins.SubmitButton(),
|
||||
//defaultSubmit: new FormValidation.plugins.DefaultSubmit(), // Uncomment this line to enable normal button submit after form validation
|
||||
bootstrap: new FormValidation.plugins.Bootstrap()
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$('#kt_login_signin_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
validation.validate().then(function(status) {
|
||||
if (status == 'Valid') {
|
||||
swal.fire({
|
||||
text: "All is cool! Now you submit this form",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn font-weight-bold btn-light-primary"
|
||||
}
|
||||
}).then(function() {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
} else {
|
||||
swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn font-weight-bold btn-light-primary"
|
||||
}
|
||||
}).then(function() {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Handle forgot button
|
||||
$('#kt_login_forgot').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
_showForm('forgot');
|
||||
});
|
||||
|
||||
// Handle signup
|
||||
$('#kt_login_signup').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
_showForm('signup');
|
||||
});
|
||||
}
|
||||
|
||||
var _handleSignUpForm = function(e) {
|
||||
var validation;
|
||||
var form = KTUtil.getById('kt_login_signup_form');
|
||||
|
||||
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
|
||||
validation = FormValidation.formValidation(
|
||||
form,
|
||||
{
|
||||
fields: {
|
||||
fullname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Username is required'
|
||||
}
|
||||
}
|
||||
},
|
||||
email: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Email address is required'
|
||||
},
|
||||
emailAddress: {
|
||||
message: 'The value is not a valid email address'
|
||||
}
|
||||
}
|
||||
},
|
||||
password: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'The password is required'
|
||||
}
|
||||
}
|
||||
},
|
||||
cpassword: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'The password confirmation is required'
|
||||
},
|
||||
identical: {
|
||||
compare: function() {
|
||||
return form.querySelector('[name="password"]').value;
|
||||
},
|
||||
message: 'The password and its confirm are not the same'
|
||||
}
|
||||
}
|
||||
},
|
||||
agree: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'You must accept the terms and conditions'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap: new FormValidation.plugins.Bootstrap()
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$('#kt_login_signup_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
validation.validate().then(function(status) {
|
||||
if (status == 'Valid') {
|
||||
swal.fire({
|
||||
text: "All is cool! Now you submit this form",
|
||||
icon: "success",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn font-weight-bold btn-light-primary"
|
||||
}
|
||||
}).then(function() {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
} else {
|
||||
swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn font-weight-bold btn-light-primary"
|
||||
}
|
||||
}).then(function() {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Handle cancel button
|
||||
$('#kt_login_signup_cancel').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
_showForm('signin');
|
||||
});
|
||||
}
|
||||
|
||||
var _handleForgotForm = function(e) {
|
||||
var validation;
|
||||
|
||||
// Init form validation rules. For more info check the FormValidation plugin's official documentation:https://formvalidation.io/
|
||||
validation = FormValidation.formValidation(
|
||||
KTUtil.getById('kt_login_forgot_form'),
|
||||
{
|
||||
fields: {
|
||||
email: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: 'Email address is required'
|
||||
},
|
||||
emailAddress: {
|
||||
message: 'The value is not a valid email address'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
trigger: new FormValidation.plugins.Trigger(),
|
||||
bootstrap: new FormValidation.plugins.Bootstrap()
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Handle submit button
|
||||
$('#kt_login_forgot_submit').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
validation.validate().then(function(status) {
|
||||
if (status == 'Valid') {
|
||||
// Submit form
|
||||
KTUtil.scrollTop();
|
||||
} else {
|
||||
swal.fire({
|
||||
text: "Sorry, looks like there are some errors detected, please try again.",
|
||||
icon: "error",
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: "Ok, got it!",
|
||||
customClass: {
|
||||
confirmButton: "btn font-weight-bold btn-light-primary"
|
||||
}
|
||||
}).then(function() {
|
||||
KTUtil.scrollTop();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Handle cancel button
|
||||
$('#kt_login_forgot_cancel').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
_showForm('signin');
|
||||
});
|
||||
}
|
||||
|
||||
// Public Functions
|
||||
return {
|
||||
// public functions
|
||||
init: function() {
|
||||
_login = $('#kt_login');
|
||||
|
||||
_handleSignInForm();
|
||||
_handleSignUpForm();
|
||||
_handleForgotForm();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// Class Initialization
|
||||
jQuery(document).ready(function() {
|
||||
KTLogin.init();
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user