fix N_SE-31582 : change strict AppControl operation checking
authorYoung Ik Cho <youngik.cho@samsung.com>
Wed, 17 Apr 2013 10:02:43 +0000 (19:02 +0900)
committerYoung Ik Cho <youngik.cho@samsung.com>
Wed, 17 Apr 2013 10:02:43 +0000 (19:02 +0900)
Change-Id: I3b84d3124a4116522382b28299cf8bafb384238a
Signed-off-by: Young Ik Cho <youngik.cho@samsung.com>
src/bluetooth-app-control/BluetoothAppControlDllEntry.cpp
src/browser-app-control/BrowserAppControlDllEntry.cpp [moved from src/browser-app-control/BrowserAppControlDLLEntry.cpp with 83% similarity]
src/browser-app-control/CMakeLists.txt [changed mode: 0755->0644]
src/call-app-control/PhoneAppControlDllEntry.cpp
src/filemanager-app-control/FileManagerAppControlDllEntry.cpp

index 3a7bea0..d4a42a4 100755 (executable)
@@ -54,14 +54,6 @@ void OnAppControlResult(void*, int, service_result_e, void*);
 static int __req = -1;
 static int __processId = -1;
 
-static const char __allowedAppControlTable[][2][96] =
-{
-       {"osp.appcontrol.BT", "osp.appcontrol.operation.PICK"},
-       {"osp.appcontrol.provider.bluetooth", "osp.appcontrol.operation.pick"},
-       {"tizen.bluetooth", "http://tizen.org/appcontrol/operation/pick"},
-       {"tizen.bluetooth", "http://tizen.org/appcontrol/operation/bluetooth/pick"},
-};
-
 
 result
 StartAppControl(int req, const String& aId, const String& oId, const String* pUri, const String* pMime, const IMap* pMap)
@@ -75,9 +67,6 @@ StartAppControl(int req, const String& aId, const String& oId, const String* pUr
        r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.bluetooth", isBtSupported);
        SysTryReturnResult(NID_APP, (r == E_SUCCESS) && (isBtSupported == true), E_SYSTEM, "[%s] Bluetooth is not supported.", GetErrorMessage(r));
 
-       const bool isAllowed = _AppControlManager::IsAllowedAppControl(__allowedAppControlTable, 4, aId, oId);
-       SysTryReturnResult(NID_APP, isAllowed, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), oId.GetPointer());
-
        SysLog(NID_APP, "Bluetooth AppControl.");
 
        msg.AddData(pMap);
@@ -47,21 +47,11 @@ result _OSP_EXPORT_ StartAppControl(int req, const String&, const String&, const
 result _OSP_EXPORT_ TerminateAppControl(int req);
 
 
-static const char __allowedAppControlTable[][2][96] =
-{
-       {"osp.appcontrol.BROWSER", "osp.appcontrol.operation.DEFAULT"},
-       {"osp.appcontrol.provider.browser", "osp.appcontrol.operation.view"},
-       {"tizen.internet", "http://tizen.org/appcontrol/operation/view"},
-};
-
 result
 StartAppControl(int req, const String& aId, const String& oId, const String* pUri, const String* pMime, const IMap* pMap)
 {
        SysLog(NID_APP, "StartAppControl: Entry to Browser AppControl");
 
-       const bool isAllowed = _AppControlManager::IsAllowedAppControl(__allowedAppControlTable, 3, aId, oId);
-       SysTryReturnResult(NID_APP, isAllowed, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), oId.GetPointer());
-
        _AppMessageImpl msg;
 
        const String* pActualUri = pUri;
old mode 100755 (executable)
new mode 100644 (file)
index b5fb60f..a82b901
@@ -5,7 +5,7 @@ INCLUDE_DIRECTORIES (
        )
 
 SET (${this_target}_SOURCE_FILES
-       BrowserAppControlDLLEntry.cpp
+       BrowserAppControlDllEntry.cpp
        )
        
 ## SET EXTRA COMPILER FLAGS
index 5ec72ad..f4fecf5 100644 (file)
@@ -43,21 +43,6 @@ extern "C" {
 result _OSP_EXPORT_ StartAppControl(int req, const String&, const String&, const String*, const String*, const IMap*);
 result _OSP_EXPORT_ TerminateAppControl(int req);
 
-static const char __allowedAppControlCallTable[][2][96] =
-{
-       {"osp.appcontrol.CALL", "osp.appcontrol.operation.DEFAULT"},
-       {"osp.appcontrol.provider.call", "osp.appcontrol.operation.call"},
-       {"tizen.phone", "http://tizen.org/appcontrol/operation/call"},
-       {"tizen.call", "http://tizen.org/appcontrol/operation/call"},
-};
-
-static const char __allowedAppControlDialTable[][2][96] =
-{
-       {"osp.appcontrol.DIAL", "osp.appcontrol.operation.DEFAULT"},
-       {"osp.appcontrol.provider.call", "osp.appcontrol.operation.dial"},
-       {"tizen.phone", "http://tizen.org/appcontrol/operation/dial"},
-};
-
 
 result
 StartAppControl(int req, const String& aId, const String& operationId, const String* pUri, const String* pMime, const IMap* pMap)
@@ -66,11 +51,6 @@ StartAppControl(int req, const String& aId, const String& operationId, const Str
 
        result r = E_SUCCESS;
 
-       const bool isCall = _AppControlManager::IsAllowedAppControl(__allowedAppControlCallTable, 4, aId, operationId);
-       const bool isDial = _AppControlManager::IsAllowedAppControl(__allowedAppControlDialTable, 3, aId, operationId);
-
-       SysTryReturnResult(NID_APP, isCall || isDial, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), operationId.GetPointer());
-
        _AppMessageImpl msg;
 
        const String* pActualUri = pUri;
@@ -86,8 +66,6 @@ StartAppControl(int req, const String& aId, const String& operationId, const Str
                {
                        tmp = L"tel:" + data;
                        pActualUri = &tmp;
-
-                       msg.RemoveData(L"tel");
                }
 
                data = msg.GetValue(L"type");
index 68b5cee..1cb91d4 100644 (file)
@@ -49,13 +49,6 @@ void OnAppControlResult(void*, int, service_result_e, void*);
 static int __req = -1;
 static int __processId = -1;
 
-static const char __allowedAppControlMediaTable[][2][96] =
-{
-       {"osp.appcontrol.MEDIA", "osp.appcontrol.operation.PICK"},
-       {"osp.appcontrol.provider.media", "osp.appcontrol.operation.pick"},
-       {"tizen.filemanager", "http://tizen.org/appcontrol/operation/pick"},
-};
-
 
 result
 StartAppControl(int req, const String& aId, const String& oId, const String* pUriData, const String* pMime, const IMap* pMap)
@@ -63,9 +56,6 @@ StartAppControl(int req, const String& aId, const String& oId, const String* pUr
        result r = E_SYSTEM;
        SysLog(NID_APP, "StartAppControl: Entry to FileManager AppControl");
 
-       const bool isMedia = _AppControlManager::IsAllowedAppControl(__allowedAppControlMediaTable, 3, aId, oId);
-       SysTryReturnResult(NID_APP, isMedia, E_SYSTEM, "Invalid AppControl entry for (%ls, %ls).", aId.GetPointer(), oId.GetPointer());
-
        _AppMessageImpl msg;
        msg.AddData(pMap);