sandbox

Can workers be secure enough for an untrusted code

萝らか妹 提交于 2019-11-30 18:52:01
问题 I have an untrusted code submitted by a user, and I need to execute it in a sandboxed environment in a browser. I was advised that Web-Workers cannot be secure enough for that, and that a sandbxed iframe should better be used. This page: https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet#Web_Workers also says workers are not suitable for untrusted code. But if I create a worker from a Blob, its url even has a different protocol ( blob:// ). Is separate origin policy applied to the

QLPreviewView can not show the quicklook preview in sandbox

蹲街弑〆低调 提交于 2019-11-30 18:04:18
问题 I use QLPreviewView to show the quicklook preview in the app. Without sandbox, this works well, but once change the app to sandbox, the preview can not show up. I found the error in Console: QuickLookUIHelpe(20786) deny file-read-data XXX. I have used the security-scoped bookmarks & com.apple.security.files.user-selected.read-write to grant access the user home dir, then: [allowedURL startAccessingSecurityScopedResource]; self.myPreiviewItem.myURL = fileURL; self.myQLPreviewView.previewItem =

How to store local data after user delete my iOS app?

我的未来我决定 提交于 2019-11-30 12:48:00
I thought it's impossible, because all the data store in a sandbox, when user delete the app, all the data should be removed from the device. But somehow, this happened: I downloaded a wallpaper app from the appstore. It's a free app, if you don't pay, you can download limited wallpapers, up to 105. I download a wallpaper and save to my album. it's now 1/105. I delete the app, and delete the wallpaper in my album. I turn off the iCloud backup function. OK, It's totally removed from my device, right? I download it again. I enter flight mode, so there is no internet connection. I open the app,

Why does the Flash Player throw a sandbox error in this case?

孤街醉人 提交于 2019-11-30 11:22:26
I get a Flex 3 sandbox error #2048 after connecting to a Socket on a Java (1.5) server. The server code is all mine, i.e. not running under Apache. Flash Player 10.0 r32. The sequence is as follows... 1 Java server starts, listens on port 843 for policy file request and on port 45455 for my other requests. 2 Flex client served by Apache (although I get the same result if I run it from the file system), socket connection made on host:45455. 3 Flash Player requests policy file from port 843. This is the standard behaviour with the new security settings looking for a master file. It happens

Loading Assemblies from a .Net Application in a 'Sandbox Environment'

半腔热情 提交于 2019-11-30 10:31:54
I am currently developing an application in where a user will dynamically choose dlls and the application will execute some of the methods in that dll. ( if you follow the first link, you will see that I am developing a sort of Robocode game application using the .Net Framework ). For example, when the battle starts, the run method from the dll is executed. Since whatever was specified in the run method will be executed, there are quite a bit of Security Constraints that have to be applied. Like for example, if the user who programmed the dll, instead of using only the methods that are

What is an extjs sandbox?

こ雲淡風輕ζ 提交于 2019-11-30 09:12:41
问题 I was interested in knowing about extjs sandbox but wasn't able to find much about it on web. Could someone tell or point to some relevant resource as to what an extjs sandbox is and how does it work. Thanks in advance! 回答1: An Ext JS sandbox is simply a different name on the top-level namespace. Normally, all Ext JS code falls under the "Ext" namespace, so you would refer to classes as Ext.Element, Ext.MessageBox, etc. The sandbox (specifically, the Ext JS 4 sandbox) uses "Ext4" instead (as

Make sandbox around Function() in Javascript

半世苍凉 提交于 2019-11-30 09:09:39
Can I limit the access of a string-generated function (using the Function constructor) to the parent/global scopes? For example: the following code, as it is, prints false , because the function is storing/modifying the variable a in window. window.a = 4; Function("a=3;")() console.log(a === 4); Could I restrict the access to window/parent scope and make it print out "true" ? Here is an additional idea which could be quite powerful together with Esailija's proposal (see the comments on his answer for the discussion). You could create dummy iframe and use its Function function. The function

How to run java code in a restricted sandbox (without network, filesystem access)

可紊 提交于 2019-11-30 08:58:24
Say some programmer gives me an executable jar (from Java code) along with the entry point to use. I want to run this jar (programmatically) from Java code in a restricted sandbox environment with no network or filesystem access or database access and a fixed amount of CPU and memory. I.e., the Java code should not cause any side effects on other programs running on the my jvm. Ideally I would like to allow certain access based on situation (say for example, only files in a certain directory with quota). You can control the environment using policy files http://docs.oracle.com/javase/1.4.2

Mac OS X app crash with Code Signature Invalid error

蓝咒 提交于 2019-11-30 08:20:39
I write an app for OS X and when I archive the app and export it as an application and try to open then it crashes with Code Signature Invalid error. I have created Mac App Distribution, Mac Installer Distribution, Developer ID Application, Developer ID Installer certificates and distribution provisiong profile. The app is sandboxed and I tested it on Mavericks. Exception Type: EXC_CRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 VM Regions Near 0x7fff71ce90a8 (cr2): __LINKEDIT 00007fff67043000-00007fff67057000 [ 80K] r--/rwx SM=COW /usr/lib/dyld -->

Cocoa: take screenshot of desktop wallpaper (without icons and windows)

微笑、不失礼 提交于 2019-11-30 07:37:05
问题 Is is possible to capture the Mac OS X desktop without desktop items and any windows that may be open (i.e. just the wallpaper)? I've experimented with CGWindowListCreateImage , CGWindowListCreateImageFromArray , and CGDisplayCreateImage , but no luck. Essentially I'm trying to capture the desktop wallpaper without using [NSWorkspace desktopImageURLForScreen:] (it's a sandboxed app without access to the file system). 回答1: You'll need to be careful to test that this is still correct, but the