mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -86,7 +86,7 @@ module.exports = function (SocketUser) {
|
||||
function (userData, next) {
|
||||
if (userData.uploadedpicture && !userData.uploadedpicture.startsWith('http')) {
|
||||
var pathToFile = path.join(nconf.get('base_dir'), 'public', userData.uploadedpicture);
|
||||
if (pathToFile.startsWith(path.join(nconf.get('base_dir'), nconf.get('upload_path')))) {
|
||||
if (pathToFile.startsWith(nconf.get('upload_path'))) {
|
||||
require('fs').unlink(pathToFile, function (err) {
|
||||
if (err) {
|
||||
winston.error(err);
|
||||
|
||||
Reference in New Issue
Block a user