Skip to content

Commit

Permalink
Squashed 'airdcpp-webapi/' changes from d8fdda516..bcde0a73a
Browse files Browse the repository at this point in the history
bcde0a73a Include cleanup
946fae3d0 Don't install blocked extensions

git-subtree-dir: airdcpp-webapi
git-subtree-split: bcde0a73ad50d865dbc543bec9806207d7fdc5a6
  • Loading branch information
maksis committed Dec 5, 2020
1 parent a211cf8 commit 2a10da8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion api/TransferApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <airdcpp/Download.h>
#include <airdcpp/Upload.h>

#include <airdcpp/AirUtil.h>
#include <airdcpp/DownloadManager.h>
#include <airdcpp/ConnectionManager.h>
#include <airdcpp/QueueManager.h>
Expand Down
1 change: 0 additions & 1 deletion api/common/MessageUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <web-server/Session.h>

#include <airdcpp/ActionHook.h>
#include <airdcpp/AirUtil.h>
#include <airdcpp/Magnet.h>
#include <airdcpp/MessageCache.h>
#include <airdcpp/ShareManager.h>
Expand Down
2 changes: 2 additions & 0 deletions web-server/ApiSettingItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef DCPLUSPLUS_DCPP_APISETTINGITEM_H
#define DCPLUSPLUS_DCPP_APISETTINGITEM_H

#include "stdinc.h"

#include <airdcpp/GetSet.h>
#include <airdcpp/SettingItem.h>
#include <airdcpp/ResourceManager.h>
Expand Down
10 changes: 10 additions & 0 deletions web-server/ExtensionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,16 @@ namespace webserver {
return;
}

// Check blocked extensions
{
RLock l(cs);
auto i = blockedExtensions.find(extensionName);
if (i != blockedExtensions.end()) {
failInstallation(aInstallId, STRING(WEB_EXTENSION_INSTALL_BLOCKED), i->second);
return;
}
}

// Updating an existing extension?
auto extension = getExtension(extensionName);
if (extension) {
Expand Down
1 change: 1 addition & 0 deletions web-server/NpmRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <airdcpp/ResourceManager.h>
#include <airdcpp/ScopedFunctor.h>
#include <airdcpp/Thread.h>
#include <airdcpp/Util.h>


namespace webserver {
Expand Down

0 comments on commit 2a10da8

Please sign in to comment.