sandbox

Python: block network connections for testing purposes?

六月ゝ 毕业季﹏ 提交于 2019-11-27 13:08:27
问题 I'm trying to test a package that provides interfaces to a few web services. It has a test suite that is supposed to test most functions without connecting to the internet. However, there are some lingering tests that may attempt to connect to the internet / download data, and I'd like to prevent them from doing so for two reasons: first, to make sure my test suite works if no network connection is available; second, so that I'm not spamming the web services with excess queries. An obvious

iOS7 - receipts not validating at sandbox - error 21002 (java.lang.IllegalArgumentException)

风流意气都作罢 提交于 2019-11-27 12:29:50
I'm converting an app from iOS6 to iOS7. Before I used the deprecated transactionReceipt method so now I'm trying the recommended methods to retrieve the receipt, and then encode in base 64: NSData *working = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]]; // Tried 64 or 76 chars/line and LF or CR line endings NSString *receipt = [working base64EncodedStringWithOptions:kNilOptions]; The above is the only change in the code. Below is how I validate it, no changes: dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_async

How to disable Sandbox Mode for app in new Facebook Developer?

好久不见. 提交于 2019-11-27 12:02:34
I can not see an option to disable that in the new Developers design! Its seems they have moved this option to the "Status & Review" section. When accessing this section you will see this text: Do you want to make this app and all its live features available to the general public? And a button where you can change it to "Yes" or "No". before go to the "Status & Review" option, first you need to go to settings option and add "Contact Email", then go to "Status & Review" When accessing this section you will see this text: Do you want to make this app and all its live features available to the

IFRAME sandbox attribute is blocking AJAX calls

白昼怎懂夜的黑 提交于 2019-11-27 10:40:50
问题 I have an application ( http://localhost/MyApp ), where some of the parts are rendered through IFRAMES. These iframed parts has no business with the rest of the application's DOM, so I applied the sandbox attribute. The IFRAME is declared like this: <iframe src="/MyApp/en/html/action?id=1" sandbox="allow-forms allow-scripts" seamless="seamless"></iframe> The iframed page has a button that makes a AJAX call to the same web application, but then rather than a HTTP GET , the browser issues a

iOS In App Purchase: Will Apple reviewers test live or sandbox environment?

99封情书 提交于 2019-11-27 09:46:42
问题 I use In App Payment to sell ingame consumables. After successfull payment I forward the payment receipt to my backend, which validates the receipt with the iTunes payment backend. This works flawlessly in the sandbox environment. Now I submitted my app so it can be approved by the Apple guys and be published in the App Store. Of course I made sure that my backend will be validating the payment receipts with the production environment of the itunes backend, because I expected the Apple guys

Please login to use the PayPal sandbox feature

牧云@^-^@ 提交于 2019-11-27 09:11:28
With the recent revamp of the PayPal developer site, I have encountered many problems trying to test my site with PayPal integration. Issue 1: I am not able to check out from out site which it should bring me to sandbox.paypal.com, it return me the common error of "Please login to use the PayPal sandbox feature". I have confirmed that I am logged in to the developer site at developer.paypal.com. Issue 2: Under Applications > Sandbox accounts, in one of the account, I am redirected to the live site at www.paypal.com by clicking on "Sandbox site". It should bring me to sandbox.paypal.com so I

Secure way to run other people code (sandbox) on my server?

家住魔仙堡 提交于 2019-11-27 07:28:05
I want to make a web service that run other people code locally... Naturally, I want to limit their code access to certain "sandbox" directory, and that they wont be able to connect to other parts of my server (DB, main webserver, etc) Whats the best way to do it? Run VMware/Virtualbox: (+) I guess it's as secure as it gets.. even if someone manage to "hack".. they only hack the guest machine (+) can limit the cpu & memory the process uses (+) easy to setup.. just create the VM (-) harder to "connect" the sandbox directory from the host to the guest (-) wasting extra memory and cpu for

PHP sandbox/sanitize code passed to create_function

你离开我真会死。 提交于 2019-11-27 07:20:30
问题 I am using create_function to run some user-code at server end. I am looking for any of these two: Is there a way to sanitize the code passed to it to prevent something harmful from executing? Alternately, is there a way to specify this code to be run in a sandboxed environment so that the user can't play around with anything else. Thanks! 回答1: http://php.net/runkit 回答2: You could use the tonkenizer to figure out what the code will do, then whitelist certain functions and operations. I think

Sandboxing in Linux

喜夏-厌秋 提交于 2019-11-27 07:18:53
I want to create a Web app which would allow the user to upload some C code, and see the results of its execution (the code would be compiled on the server). The users are untrusted, which obviously has some huge security implications. So I need to create some kind of sandbox for the apps. At the most basic level, I'd like to restrict access to the file system to some specified directories. I cannot use chroot jails directly, since the web app is not running as a privileged user. I guess a suid executable which sets up the jail would be an option. The uploaded programs would be rather small,

Python, safe, sandbox [duplicate]

旧城冷巷雨未停 提交于 2019-11-27 07:00:56
This question already has an answer here: How can I sandbox Python in pure Python? 8 answers I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts without harming my system - actually without seeing my system at all? Thank you "Can't be done." Running arbitrary (untrusted) scripts and staying safe is a contradiction. You should go as far