feat: 上线前安全加固与发布工程化;appmall 由插件迁移为独立应用
安全(P0) - 发布包签名:新增 scripts/package_keygen.php、scripts/package_verify.php、 ywxapp\service\PackageVerifier;FrameworkService::apply() 解压前强制验签 (ywxapp.framework_package_verify,默认开启) - JWT 收紧:config/jwt.php 移除公开默认密钥,JwtService::assertStrongSecret() 校验非空 / 长度≥32 / 已知弱值;.env.production.example 键名由 JWT_SECRET_KEY 修正为 JWT_SECRET - /api/v1/Article:免登录白名单收窄为只读接口,写操作字段白名单 + assertOwner() 越权校验 - 开发者令牌:查找接口不再回显明文、统一失败文案 + 限流 - TemplateInstaller:文件名白名单 + realpath 归一化 + 目录内断言,修复 Zip Slip;补 use ZipArchive - 后台登录:接入验证码、失败锁定与登录限流(config/ratelimit.php) - 缓存 / Session 驱动可由 .env 覆盖(CACHE_DRIVER / SESSION_TYPE),集群部署改 redis - paycenter 支付日志开关改为 PAY_LOG,不再跟随 APP_DEBUG 工程化 / 交付 - 新增 CHANGELOG.md 与 .env.production.example;composer.lock 入库锁定依赖版本 - 插件离线安装 CLI 增加 --uid,后台上传安装透传 uid,付费插件授权校验可通过 - 授权拒绝文案区分「未携带 uid」与「未找到有效授权」,便于排障 - .gitignore 放行 .env.production.example / .env.addon.example / .gitattributes / public/.htaccess 结构 - appmall 由 addon/appmall 迁移为独立应用 app/appmall(市场 / 开发者中心 / 审核 / 分润)
This commit is contained in:
1 parent
1d49e6f5ee
commit
18101cf11a
636 files changed
+58517
-9519
No files matched your search
@@ -36,13 +36,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form','jquery'], function(){
|
||||
layui.use(['form','jquery', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var form = layui.form, $ = layui.jquery;
|
||||
form.on('submit(save)', function(data){
|
||||
$.post('/forum/backend/board/save', data.field, function(res){
|
||||
http.post('/forum/backend/board/save', data.field).then(function(res){
|
||||
if (res.code === 0) { location.href = '/forum/backend/board'; }
|
||||
else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -37,13 +37,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form','jquery'], function(){
|
||||
layui.use(['form','jquery', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var form = layui.form, $ = layui.jquery;
|
||||
form.on('submit(save)', function(data){
|
||||
$.post('/forum/backend/board/update/{$row.id}', data.field, function(res){
|
||||
http.post('/forum/backend/board/update/{$row.id}', data.field).then(function(res){
|
||||
if (res.code === 0) { location.href = '/forum/backend/board'; }
|
||||
else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,14 +28,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['jquery'], function(){
|
||||
layui.use(['jquery', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var $ = layui.jquery;
|
||||
$('[data-del]').on('click', function(){
|
||||
var id = $(this).data('del');
|
||||
layer.confirm('确认删除?', function(){
|
||||
$.post('/forum/backend/board/delete/'+id, {}, function(res){
|
||||
http.post('/forum/backend/board/delete/'+id, {}).then(function(res){
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -83,19 +83,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form', 'jquery', 'layer'], function(){
|
||||
layui.use(['form', 'jquery', 'layer', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var form = layui.form, $ = layui.jquery, layer = layui.layer;
|
||||
form.on('submit(saveEditor)', function(data){
|
||||
// 开关未勾选时浏览器不提交该字段,这里补齐
|
||||
if (!data.field.editor_catch_image) { data.field.editor_catch_image = 0; }
|
||||
$.post('/forum/backend/editor/save', data.field, function(res){
|
||||
http.post('/forum/backend/editor/save', data.field).then(function(res){
|
||||
if (res.code === 0) {
|
||||
layer.msg('保存成功', {icon:1});
|
||||
setTimeout(function(){ location.reload(); }, 800);
|
||||
} else {
|
||||
layer.msg(res.message || '保存失败');
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
layui.use(['table', 'jquery', 'layer', 'form'], function () {
|
||||
layui.use(['table', 'jquery', 'layer', 'form', 'http', 'ywxapp'], function () {
|
||||
var http = layui.http;
|
||||
var table = layui.table, $ = layui.jquery, layer = layui.layer, form = layui.form;
|
||||
|
||||
var dataTable = table.render({
|
||||
@@ -70,14 +71,14 @@ layui.use(['table', 'jquery', 'layer', 'form'], function () {
|
||||
if (obj.event === 'delete') {
|
||||
layer.confirm('确认删除?', function (index) {
|
||||
layer.close(index);
|
||||
$.post('delete', { id: data.id }, function (res) {
|
||||
http.post('delete', { id: data.id }).then(function (res) {
|
||||
if (res.code === 0) {
|
||||
layer.msg('删除成功', { icon: 1 });
|
||||
dataTable.reload();
|
||||
} else {
|
||||
layer.msg(res.message || '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -20,21 +20,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['jquery','layer'], function(){
|
||||
layui.use(['jquery','layer', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var $ = layui.jquery, layer = layui.layer;
|
||||
$('#addTag').on('click', function(){
|
||||
layer.prompt({title:'输入标签名称'}, function(val, index){
|
||||
$.post('/forum/backend/tag/save', {name:val}, function(res){
|
||||
http.post('/forum/backend/tag/save', {name:val}).then(function(res){
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
$('[data-del]').on('click', function(){
|
||||
var id = $(this).data('del');
|
||||
layer.confirm('确认删除?', function(){
|
||||
$.post('/forum/backend/tag/delete/'+id, {}, function(res){
|
||||
http.post('/forum/backend/tag/delete/'+id, {}).then(function(res){
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,13 +59,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['form','jquery'], function(){
|
||||
layui.use(['form','jquery', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var form = layui.form, $ = layui.jquery;
|
||||
form.on('submit(save)', function(data){
|
||||
$.post('/forum/backend/topic/update/{$row.id}', data.field, function(res){
|
||||
http.post('/forum/backend/topic/update/{$row.id}', data.field).then(function(res){
|
||||
if (res.code === 0) { location.href = '/forum/backend/topic'; }
|
||||
else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['jquery','laypage'], function(){
|
||||
layui.use(['jquery','laypage', 'http', 'ywxapp'], function(){
|
||||
var http = layui.http;
|
||||
var $ = layui.jquery, laypage = layui.laypage;
|
||||
laypage.render({ elem:'pager', count:{$list.total}, limit:20,
|
||||
curr:{$list.currentPage}, jump:function(obj,first){
|
||||
@@ -44,25 +45,25 @@ layui.use(['jquery','laypage'], function(){
|
||||
$('[data-del]').on('click', function(){
|
||||
var id = $(this).data('del');
|
||||
layer.confirm('确认删除?', function(){
|
||||
$.post('/forum/backend/topic/audit/'+id+'?act=del', {}, function(res){}, 'json');
|
||||
$.post('/forum/backend/topic/delete/'+id, {}, function(res){
|
||||
http.post('/forum/backend/topic/audit/'+id+'?act=del', {}).then(function(res){});
|
||||
http.post('/forum/backend/topic/delete/'+id, {}).then(function(res){
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
$('[data-audit]').on('click', function(){
|
||||
var id = $(this).data('audit');
|
||||
$.post('/forum/backend/topic/audit/'+id, {}, function(res){
|
||||
http.post('/forum/backend/topic/audit/'+id, {}).then(function(res){
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
$('[data-reject]').on('click', function(){
|
||||
var id = $(this).data('reject');
|
||||
layer.prompt({title:'驳回理由', formType:2}, function(val, index){
|
||||
$.post('/forum/backend/topic/reject/'+id, {reason:val}, function(res){
|
||||
http.post('/forum/backend/topic/reject/'+id, {reason:val}).then(function(res){
|
||||
layer.close(index);
|
||||
if (res.code === 0) { location.reload(); } else { layer.msg(res.message); }
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user