0%

php

起因

用别人的软件遇到了bug,这个软件是用php写的,

发现问题所在

1
2
3
echo '<p align="center"><img src="https://raw.githubusercontent.com/ednow/cloudimg/main/githubio/1626079095.jpg" title="image.jpg" alt="image.jpg" width="80%"></p>

<img src="https://raw.githubusercontent.com/ednow/cloudimg/main/githubio/1624878909(1).jpg" alt="Image not found" onerror="this.onerror=null;this.src='https://image.haiqingd.top/githubio/1624878909(1).jpg';" />' | clip

原因是因为我custom link的时候格式有误
找不到图片(Image not found)

在cmd中执行该命令,时遇到的同样的bug

找不到图片(Image not found)

尝试解决问题

  • 找到自定义链接配置所在的位置PicUploader\config\.settings
  • 出问题的代码:执行shell命令的地方uploader/Common.php,第446行

参考文献

直接echo原字符参考文献

执行shell命令的漏洞

phpstorm

开启调试

找不到图片(Image not found)

用phpstorm 调试的时候报下面这个错

Connection was not established.Debug extension is not installed

原因是没有装调试的插件

装调试插件

参考文献

xdebug

参考文献