Skip to content

Commit

Permalink
modstart upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Sep 27, 2024
1 parent ef64497 commit 22a9726
Show file tree
Hide file tree
Showing 135 changed files with 3,659 additions and 12,327 deletions.
2 changes: 1 addition & 1 deletion app/Constant/AppConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class AppConstant
{
const APP = 'cms9';
const APP_NAME = 'ModStartCMS9';
const VERSION = '8.8.0';
const VERSION = '8.9.0';

}
2 changes: 1 addition & 1 deletion module/Banner/Asset/style/banner.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion module/Member/Admin/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public function setting(AdminConfigBuilder $builder)
$builder->number('Member_PasswordLengthMin', '密码最小长度')
->defaultValue(0)
->help('0表示不限制,推荐为8位以上');

$builder->switch('Member_LoginInfoEncrypt', '登录信息加密')
->help('开启后,登录信息请求时将会加密传输');
});
if (ModuleManager::getModuleConfig('Member', 'dataStatisticEnable', false)) {
$builder->layoutPanel('存储上传', function ($builder) {
Expand Down
5 changes: 3 additions & 2 deletions module/Member/Api/Controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use ModStart\Core\Util\CurlUtil;
use ModStart\Core\Util\EventUtil;
use ModStart\Core\Util\RandomUtil;
use ModStart\Core\Util\SecureUtil;
use ModStart\Core\Util\StrUtil;
use ModStart\Misc\Captcha\CaptchaFacade;
use ModStart\Module\ModuleBaseController;
Expand Down Expand Up @@ -712,8 +713,8 @@ public function login()
{
$input = InputPackage::buildFromInput();

$username = $input->getTrimString('username');
$password = $input->getTrimString('password');
$username = $input->getTrimStringWithAutoDecrypt('username');
$password = $input->getTrimStringWithAutoDecrypt('password');
if (empty($username)) {
return Response::generate(-1, '请输入用户');
}
Expand Down
1 change: 1 addition & 0 deletions module/Member/Docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- 新增:VIP 优惠券功能集成,支持折扣券
- 新增:可完全自定义上传功能定制的特性 UploadScript Hook
- 新增:用户登录传输用户密码加密
- 优化:VIP 开通页面交互形式优化

---
Expand Down
9 changes: 7 additions & 2 deletions module/Member/View/pc/inc/loginPanel.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@
</div>
<div class="ub-form flat">
<form action="{{modstart_web_url('login')}}" method="post" data-ajax-form>
@if(modstart_config('Member_LoginInfoEncrypt',false))
<input type="hidden" data-encrypt-data name="ek" value="{{\ModStart\Core\Util\RandomUtil::string(8)}}" />
@endif
<div class="line">
<div class="field">
<input type="text" class="form-lg" name="username" placeholder="输入用户" />
<input type="text" class="form-lg" name="username" placeholder="输入用户"
@if(modstart_config('Member_LoginInfoEncrypt',false)) data-encrypt-field="username" @endif/>
</div>
</div>
<div class="line">
<div class="field">
<input type="password" class="form-lg" name="password" placeholder="输入密码" />
<input type="password" class="form-lg" name="password" placeholder="输入密码"
@if(modstart_config('Member_LoginInfoEncrypt',false)) data-encrypt-field="password" @endif/>
</div>
</div>
@if(modstart_config('loginCaptchaEnable',false))
Expand Down
9 changes: 7 additions & 2 deletions module/Member/View/pc/loginDialog.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@
</div>
<div class="ub-form flat">
<form action="{{\ModStart\Core\Input\Request::currentPageUrl()}}" method="post" data-ajax-form>
@if(modstart_config('Member_LoginInfoEncrypt',false))
<input type="hidden" data-encrypt-data name="ek" value="{{\ModStart\Core\Util\RandomUtil::string(8)}}" />
@endif
<div class="line">
<div class="field">
<input type="text" class="form-lg" name="username" placeholder="输入用户" />
<input type="text" class="form-lg" name="username" placeholder="输入用户"
@if(modstart_config('Member_LoginInfoEncrypt',false)) data-encrypt-field="username" @endif />
</div>
</div>
<div class="line">
<div class="field">
<input type="password" class="form-lg" name="password" placeholder="输入密码" />
<input type="password" class="form-lg" name="password" placeholder="输入密码"
@if(modstart_config('Member_LoginInfoEncrypt',false)) data-encrypt-field="password" @endif />
</div>
</div>
@if(modstart_config('loginCaptchaEnable',false))
Expand Down
14 changes: 7 additions & 7 deletions module/Member/View/pc/memberProfile/avatar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class="tw-h-48 tw-rounded-lg"
</div>
</div>
<div data-box-tool class="margin-bottom">
<button type="button" class="btn btn-round btn-round" id="avatarImageUpload">
<button type="button" class="btn btn-round" id="avatarImageUpload">
<i class="iconfont icon-upload"></i>
选择图片
</button>
Expand All @@ -97,22 +97,22 @@ class="tw-h-48 tw-rounded-lg"
<img id="editingPreview" style="max-width:80%;max-height:300px;"/>
</div>
<div data-box-editing class="margin-bottom pb-page-hidden">
<a href="javascript:;" class="btn btn-round btn-round" id="avatarBack">
<a href="javascript:;" class="btn btn-round" id="avatarBack">
<i class="iconfont icon-direction-left"></i>
返回
</a>
<a href="javascript:;" class="btn btn-round btn-round" id="avatarImageReupload">
<a href="javascript:;" class="btn btn-round" id="avatarImageReupload">
<i class="iconfont icon-upload"></i>
重新选择
</a>
<a href="javascript:;" class="btn btn-round btn-round" id="avatarZoomOut">
<a href="javascript:;" class="btn btn-round" id="avatarZoomOut">
<i class="iconfont icon-zoom-out"></i>
</a>
<a href="javascript:;" class="btn btn-round btn-round" id="avatarZoomIn">
<a href="javascript:;" class="btn btn-round" id="avatarZoomIn">
<i class="iconfont icon-zoom-in"></i>
</a>
<a href="javascript:;" class="btn btn-round btn-round btn-primary" id="avatarSave">
<i class="uk-icon-save"></i> 保存头像
<a href="javascript:;" class="btn btn-round btn-primary" id="avatarSave">
<i class="iconfont icon-save"></i> 保存头像
</a>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions module/Member/Web/Controller/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace Module\Member\Web\Controller;

use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Session;
use ModStart\Core\Exception\BizException;
use ModStart\Core\Input\InputPackage;
Expand Down Expand Up @@ -350,6 +351,11 @@ public function oauthLogin($oauthType = null)
{
$input = InputPackage::buildFromInput();

$refer = Request::headerReferer();
if (empty($refer)) {

}

/** @deprecated delete at 2024-06-29 */
$view = $input->getBoolean('view', false);
if ($view) {
Expand Down
Loading

0 comments on commit 22a9726

Please sign in to comment.