Giter Site home page Giter Site logo

bs-community / blessing-skin-server Goto Github PK

View Code? Open in Web Editor NEW
804.0 8.0 118.0 20.99 MB

Web application brings your custom skins back in offline Minecraft servers.

License: MIT License

JavaScript 0.01% PHP 52.79% CSS 0.30% HTML 0.06% TypeScript 40.87% PowerShell 0.22% Shell 0.01% Twig 5.32% Blade 0.12% Dockerfile 0.31%
minecraft laravel

blessing-skin-server's People

Contributors

asnxthaony avatar azure-pipelines[bot] avatar bingling-sama avatar dependabot[bot] avatar dz-paji avatar g-plane avatar graytoowolf avatar gxres042 avatar hilookas avatar lzjluzijie avatar mochaap avatar moecinnamo avatar prinsss avatar timgiroux avatar tnqzh123 avatar xfl03 avatar xtlsoft avatar yushijinhun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blessing-skin-server's Issues

Relicense

虽然可能没什么意义,不过还是值得提一提。

@printempw 现在应该不会活跃参与开发此项目了,所以我希望这个项目能在 license 上有所放松,我觉得 MIT 或 Apache License 2.0 就不错。

不知道各位有什么看法?如果大家还是更喜欢 GPL,那我也是不介意的。

notifications 表设计不合理

在 BS v4.3.6 更新的「通知」功能中,(Laravel 自动生成的)notifications 表的设计是:每个用户每条通知生成一条记录。这个设计并不合理。

如果通知对象较多(例如 LittleSkin 的全体用户),容易因为后端处理时间过长,而导致 CDN 回源超时等问题。

API 应用场景调查

最近我们正在为 Blessing Skin 添加开放 API。如果您对此有兴趣,不妨参与这个调查,只需按下面的模板回复这个 issue 就行。

应用需求和场景(简短描述):
可能用到的编程语言:


考虑到本 issue 太长,不方便讨论,建议各位如果有需求,可以开新的 issue 进行讨论。


已经在 v5 中实现的 API:

  • 创建角色、修改角色信息、删除角色
  • 操作衣柜
  • 获取当前用户基本信息
  • 读取通知、管理员发送通知
  • 管理员管理用户
  • 管理员对用户的角色进行管理
  • 管理员对用户的衣柜进行管理(暂不支持重命名物品)
  • 管理员管理举报

明确不会实现的 API:

  • 签到并获取积分(会被滥用)
  • 注册账号、找回密码

[建议]在FAQ里增加open_basedir restriction in effect一节

自从root改到public下,好像各种问题不断(笑
1.如果是php的问题,修改php.ini中open_basedir= ;若php.ini中此项未设置(已留空),则请往下看;
2.对于apache用户,httpd.conf中去掉所有open_basedir有关的行;
3.对于nginx用户,fastcgi.conf中去掉所有open_basedir有关的行。
可能会出问题吧(

php artisan migrate

The Problem 问题描述

从3.5.0升级到4.0.0出现问题

Environment 运行环境

  • 4.0.0-beta.1
  • 物理机
  • 7.3.2
  • Nginx
  • 尚未访问

Error Message 错误信息

php artisan migrate --force

In PluginManager.php line 443:

Call to a member function getVersion() on null

Steps to Reproduce 重现步骤

按照WIKI所述从3.5.0升级到4.0.0
执行(5. 在终端或 PowerShell 中依次执行以下命令)
(php artisan migrate --force)
时出现以上报错

Attachments 附件

开发者选项对普通用户可见,且功能尚未完成。

The Problem 问题描述

开发者选项对普通用户可见,且功能尚未完成。

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.1.3
  • PHP 版本 (Version of PHP): 7.3.4
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): Nginx
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): https://[private]/user/oauth/manage

Error Message 错误信息

1.png

Steps to Reproduce 重现步骤

Yggdrasil API 能否在V4以上的插件库支持?

我测试装了4.4版本.发现最新的版本已经不支持Yggdrasil API.
我皮肤站(3.5.0)给好几位服主提供了一体化账户注册和皮肤显示.都是使用Yggdrasil API+authlib injector.
希望在新版本加回这个非常有用的功能.
我看4.4版本也已经有了正版验证绑定功能.好像在3.0版本有人提过这个authlib injector和正版登录兼容.事实上是不太可能.那么是开发者放弃了authlib injector的方案吗?

Apache config

hello guys, trying to install the belssing skin webserver, but I don't run nginx or ISS. I've a preinstalled apache2 server and don't want to change that. In the README_EN.md I found a hint that prepared apache config is available but the only file I found is the web.conf, which doesn't look like valid apache config file.. do you have an example for apache config including all the rewrite rules (if possible I would like to install it in a subfolder of another website)
thanks a lot
sarbot

Illegal string offset 'name'

The Problem 问题描述

从3.5.0更新到4.0.4后出现问题

Environment 运行环境

Error Message 错误信息

image

Steps to Reproduce 重现步骤

从3.5.0更新到4.0.4后 出现Noinput file specified. 将网站目录用户设置为www:www后正常访问并进入主页,进入控制面板后又出现Noinput file specified. 刷新后成功进入,打开插件面板后安装一个插件之后彻底变成上图。

laravel.log文件中的记录:https://paste.ubuntu.com/p/tSxQYKNBMD/

无法显示部分图片,使用Apache,已开启PHP的GD2插件和Apache的rewrite重写模块

The Problem 问题描述

无法以下显示图像:

  • 用户头像
  • 皮肤封面

以下图像可以显示:

  • 3D的皮肤预览
  • 首页背景图
  • 皮肤站图标

在资源管理器中进行查找,可以找到头像图片(史蒂夫)。

Environment 运行环境

  • Blessing Skin 版本:4.4.0
  • PHP 版本:7.3.7-win32-VC15-x64
  • Web 服务器:Apache2.4
  • 浏览器:FireFox on Windows

备注:已开启 PHP 的 gd2 扩展,Apache 的重写模块已开启

Error Message 错误信息

直接访问头像地址时出现的错误页面:

2019-07-29

错误信息:

404 Not Found
Not Found
The requested resource /avatar/128/MzM3NTY2MDA4NEBxcS5jb20=.png?tid=1 was not found on this server.

reCAPTCHA 在后端验证用户请求时的问题

当前的 reCAPTCHA 有一个问题:

  • 皮肤站要求用户在注册时输入角色名,而用户输入的角色名的长度不满足皮肤站的限制。但用户修正后,皮肤站没有要求重新进行 reCAPTCHA 验证,此时用户再提交注册,则会得到“未能通过 reCAPTCHA 验证”的错误。

因为皮肤站前端没有对用户输入的角色名的长度进行合法性校验(我也只找到了 <input> 标签的 maxlength 属性,好像没有 minlength 之类的),要传递到后端进行判断,而后端判断前已经对用户的 reCAPTCHA 验证结果的 token 进行了验证(没看源码,我猜是这样的)。因为一个 token 只能被验证一次,所以当用户修正后,后端再次向 Google 查询验证结果时,会得到无效的结果。

建议的改进方案:在前端对用户输入的角色名进行合法性校验,或是要求用户在修正角色名后重新进行 reCAPTCHA 验证。

皮肤预览点击重置后无法正常行走

在皮肤库内预览皮肤时,点击“重置按钮”人物重置到正面、暂停动画状态
点击“行走/奔跑” 按钮,人物只能在暂停与奔跑状态直接切换
无法进入行走状态。

测试地址: https://timemc.cn/skinlib/show/316

版本 4.1.4
浏览器:Google Chrome | 72.0.3626.121 (正式版本) (64 位) (cohort: 72_121_Win)

未验证邮箱的用户可以使用皮肤库中的部分功能

The Problem 问题描述

未验证邮箱的用户可以使用皮肤库中的部分功能
i.e 添加至衣柜、立即使用(会提示严重错误)

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): v4.2.0
  • PHP 版本 (Version of PHP): 7.3.5
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): Nginx
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL):

Error Message 错误信息

1

{
"message": "你必须验证邮箱后才能访问此页面"
}

Steps to Reproduce 重现步骤

安装插件报错

The Problem 问题描述

安装插件/安装更新都会报错

{
"message": "Server Error"
}

Environment 运行环境

Error Message 错误信息

{
"message": "Server Error"
}

Steps to Reproduce 重现步骤

点击安装就报错

v5 Roadmap

  • Laravel 升级至 v6
  • 插件系统:自动识别 config.blade.php 为配置页面,无需手动指定
  • 插件系统:自动加载在 package.json 指定的 ServiceProvider
  • 插件系统:加入 Filters API
  • 插件系统:加入更多事件
  • 在错误页面添加指向 FAQ 的链接
  • 增加“环境信息”页面
  • 增加 OAuth2 Client
  • 在根目录放置一个 index.html 来提示没有正确设置 Web 根目录的用户

2d皮肤预览问题

The Problem 问题描述

简要描述一下你碰到的问题 / 2d皮肤无法预览

Environment 运行环境

请填写以下内容 / Please tell us about your environment.

  • Blessing Skin 版本 / 4beta2
  • 虚拟主机还是 VPS / 自己的电脑
  • PHP 版本 / 7.3.3
  • 什么 Web 服务器,Apache 还是 Nginx / apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 / http://bs.localhost/user/player Google Chrome

Error Message 错误信息

出现错误时的提示,请把它贴上来(截图或文本)/ Paste the error message or a screenshot here.

v4有问题:
v4

v3没问题:
v3

Steps to Reproduce 重现步骤

详细描述你出错前的操作步骤 / Tell us how to reproduce this issue.

Attachments 附件

如果有需要,请在这里附上你的日志文件(如果日志很长,请上传至某处并提供链接)/ Attach your log file here if necessary.

材质名称过长,未自动截断

The Problem 问题描述

材质名称过长,未自动截断

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.0.4
  • PHP 版本 (Version of PHP):7.3.4
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): Nginx
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): Chrome https://[private]/skinlib/show/12

Error Message 错误信息

1.png

Steps to Reproduce 重现步骤

[建议]安装时进行对 .env 文件中数据库连接配置的检查

在全新安装 v4 时,尽管在 .env 中已经配置过了数据库连接信息,安装向导仍会要求填写数据库连接信息。

我的建议是在分发时,.env.example 文件中关于数据库连接的配置项的值留空,在安装时检查对应配置项的值是否非空。若为空或非空但无法连接至数据库服务器,则要求用户填写数据库连接信息(后一种情况最好给出无法连接至数据库的提示),若不为空且可以连接至数据库服务器则直接填写管理员信息。

取消设置角色模型的功能

考虑到设置角色模型的功能在实际中有可能会产生误用现象,例如设置角色的模型与皮肤对应的模型不同,我们打算删除这个功能。

实现过程:

  1. 从 UI 中删除相关功能及对应的测试
  2. 对控制器中的代码进行修改

然而考虑到目前数据表(players 表)中存在 preferencetid_stevetid_alex 字段,因此需要思考如何尽可能地能让用户平滑升级。

有两种可能的方案:

  1. 保留上述三个字段。在用户设置/更新皮肤时,根据所选的皮肤来更新 preference 字段及 tid_stevetid_alex 字段;在获取皮肤时,则像以前一样。
  2. 弃用上述三个字段,然后增加新的 tid_skin(也可以考虑不增加 tid_ 前缀,当然还要把 tid_cape 的前缀也删掉)。给这个字段设置默认值为 -1(原因稍后解释),用户设置皮肤时,就直接更新这个字段。
    值得注意的是,我们不能在升级的过程中,根据现有的 players 表中那三个字段来为现有用户设置这个字段的值,因为这个过程会十分耗时(尤其像 LittleSkin 这样的大站),而且操作起来麻烦,一旦出现闪失就有可能出现数据问题。所以,我的思路是,给这个字段设置默认值为 -1,表示什么都没有,在种情况下,需要根据旧有的 preferencetid_stevetid_alex 字段来写入新值;值为 0 表示使用默认皮肤。另外,判断是否为 -1 的时机是用户获取皮肤时,因为这个时候,皮肤 TID 一定会被读取,额外的工作仅仅是多了一条 if 判断以及在第一次时需要更新数据库,这样不会带来太大在时间损耗。

cc @yushijinhun


Edit: 采用方案二

上传皮肤的问题

The Problem 问题描述

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin):4.2.0
  • PHP 版本 (Version of PHP):7.3.4
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version):apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL):谷歌浏览器,http://xxx/skinlib/upload

Error Message 错误信息

Internal Server Error

The server encountered an internal error or
misconfiguration and was unable to complete
your request.

Please contact the server administrator at
[email protected] to inform them of the time this error occurred,
and the actions you performed just before this error.

More information about this error may be available
in the server error log.

Steps to Reproduce 重现步骤

报告一个问题:上传披风时,选择披风文件后就自动弹到人物皮肤上;如果再次选择披风,再点上传,就会出现500错误,如果直接用人物的方式上传披风,就成功,但是会出现人物扭曲的图像,需要去皮肤库里改……

然后有些披风是上传不了的,但是3.5版本可以。

【建议】提一些建议

提一些建议,完善v4版

  1. 恢复原3.5版的单角色限制插件
  2. 在 普通玩家-角色管理 页面里默认显示第一个用户的皮肤,因为有一些用户看不到这么小的字
    A

希望开发员大大能采纳建议

网站显示出现异常

The Problem 问题描述

网站模板显示异常,并且有一行错误(仅Nginx有,Apache无),并且已经尝试过反复安装 composer和更换Apache,

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin):4.0
  • PHP 版本 (Version of PHP):7.1.29
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version):Nginx
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL):http://play.cnluminous.com/

Error Message 错误信息

Warning: file_put_contents(/www/wwwroot/play.cnluminous.com/bootstrap/../vendor/autoload.php): failed to open stream: Permission denied in /www/wwwroot/play.cnluminous.com/bootstrap/chkenv.php on line 66

1
2
3
4

Steps to Reproduce 重现步骤

1.下载并解压到服务器
2.更改nginx.conf
3.取消禁用函数proc_open
4.安装composer环境
5.访问后出现问题

取消禁用函数proc_open
安装composer环境

插件市场错误

The Problem 问题描述

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.4.0
  • PHP 版本 (Version of PHP): 7.2
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): chrome https://api.fpserver.net/admin/plugins/market

Error Message 错误信息

undefined
mb_strtolower() expects parameter 1 to be string, array given
undefined

还有切换显示数量无效

Steps to Reproduce 重现步骤

在搜索栏输入任意字符
按enter搜索

玩家改名的话uuid会变啊
我是bungeecord咋办

没有插件

The Problem 问题描述

插件市场里没插件?

Environment 运行环境

请填写以下内容 / Please tell us about your environment.

  • Blessing Skin 版本 / 4.0beta1
  • 虚拟主机还是 VPS / 自己的电脑
  • PHP 版本 / 7.3.3
  • 什么 Web 服务器,Apache 还是 Nginx / apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 / bs.localhost/admin/plugins/market

Error Message 错误信息

No data for table

Steps to Reproduce 重现步骤

点击插件市场,没有任何插件

Attachments 附件

如果有需要,请在这里附上你的日志文件(如果日志很长,请上传至某处并提供链接)/ Attach your log file here if necessary.

皮肤库中部分译文缺失

The Problem 问题描述

用户语言为 English 时,皮肤库中部分译文缺失。
例:

  • skinlib.private
  • skinlib.anonymous

image

<small class="more private-label">
	skinlib.private
	<!-- 此处最多能显示 5 个字符,超出不显示。 -->
</small>

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.4.0
  • PHP 版本 (Version of PHP): 7.3.7
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): Tengine/2.3.0
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): Chrome, https://skin.[private].com/skinlib

Error Message 错误信息

Steps to Reproduce 重现步骤

建议增加 UserWillBeDeleted 事件

触发时机

用户被删除之前。

type
类型:整数
含义:

  • 0 —— 用户自行删除
  • 1 —— 用户被管理员删除

用于阻止用户删除账号。

适用于BS V4的CDN源

The Problem 问题描述

适用于BS V4的CDN源

http://bs-mirror.i-creator.cn/v4/
https://bs-mirror.i-creator.cn/v4/

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.2.1
  • PHP 版本 (Version of PHP): 不需要
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): 不需要
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): 不需要

Error Message 错误信息

不需要

Steps to Reproduce 重现步骤

不需要

安装错误

The Problem 问题描述

安装错误

Environment 运行环境

  • Blessing Skin 版本 / 4.0
  • 虚拟主机还是 VPS / 本地电脑
  • PHP 版本 / 7.3.3
  • 什么 Web 服务器,Apache 还是 Nginx / Apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 / http://127.0.0.1/blessing-skin/public/setup/info Google Chrome

Error Message 错误信息

出现错误时的提示,请把它贴上来(截图或文本)/ Paste the error message or a screenshot here.
Illuminate \ Database \ QueryException (14)
SQLSTATE[HY000] [14] unable to open database file (SQL: select * from sqlite_master where type = 'table' and name = users)

a

Steps to Reproduce 重现步骤

安装到最后一步报错

Attachments 附件

如果有需要,请在这里附上你的日志文件(如果日志很长,请上传至某处并提供链接)/ Attach your log file here if necessary.

当用户访问验证链接时,显示 "Invalid signature."

The Problem 问题描述

当用户访问验证链接时,显示"Invalid signature."

Environment 运行环境

Error Message 错误信息

QQ截图20190702140416

(日志里没有任何有价值的信息)

Steps to Reproduce 重现步骤

-> 注册账号
-> 收到皮肤站发送的邮件
-> 点击发送的验证链接
-> 此问题出现

4.0.1 插件市场故障

The Problem 问题描述

插件市场故障

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin):4.0.1
  • PHP 版本 (Version of PHP):7.2.13
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version):Apache 2.4
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL):/public/admin/plugins/market

Error Message 错误信息

{
"message": "Server Error"
}

Steps to Reproduce 重现步骤

  1. 打开插件市场

用户可在短时间内多次签到

这个问题在 LittleSkin 上出现。

用户点击「签到」按钮后,在等待服务器返回结果时可以多次点击「签到」,服务器会返回多条“签到成功”,并且获取的奖励积分都不一样。

修正Wiki链接

链接列表:

FAQ 常见问题 👈

  • Wiki - 快速安装向导 - 下载安装包
  • Wiki - 如何配置皮肤 Mod?
  • Wiki - 游戏中不显示皮肤的可能原因。
  • 报告问题的正确姿势。

报告问题的正确姿势

  • FAQ - 常见问题[2]
  • FAQ - 常见问题[3]
  • FAQ - 常见问题[4]

快速安装向导

  • FAQ - 常见问题
  • Wiki - 报告问题的正确姿势
  • Wiki - 如何配置皮肤 Mod

游戏中不显示皮肤的可能原因

  • Wiki - 如何配置皮肤 Mod
  • Wiki - 报告问题的正确姿势

关于 OAuth 的表不会被自动创建

The Problem 问题描述

关于 OAuth 的表不会被自动创建
image
用户需要手动执行 php artisan migrate 来完成数据表的创建。
image

Environment 运行环境

  • Blessing Skin 版本 (Version of Blessing Skin): 4.2.1
  • PHP 版本 (Version of PHP): 7.3.6
  • 什么 Web 服务器,Apache 还是 Nginx (Which web server and its version): Apache
  • 什么浏览器,出现错误时的地址栏 URL 是什么 (Which browser and URL): Chrome, https://skin.localhost.dev/user/oauth/manage

Error Message 错误信息

image

Steps to Reproduce 重现步骤

1、按照指南架设一个皮肤站
2、登录并打开 OAuth2 应用,出现严重错误。

更新css示例

在v4版本中,为皮肤预览添加阴影,自定义css应为
.previewer-3d canvas {
filter: drop-shadow(-5px 5px 10px rgba(0, 0, 0, 0.3));
}
麻烦更新一下~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.