我为iphone编写了一个应用程序,我希望将其中的图像保存为default.png,以便进行下一次调用.这可能吗?似乎沙箱不允许您覆盖其本地文件系统中的任何内容.
我打算在python(+ qt4)中编写一个可插拔的应用程序.但是我对安全问题非常关注.插件应该足够强大,以便在应用程序中做任何他们喜欢的事情(并且作为进一步的约束,在使用这样的插件时会有签名过程和用户警告),但是与环境交互(文件系统,其他进程) ,网络等)应该只通过我将编写的一些python代码通过插件来完成.
有没有安全简便的方法来实现它,除了必须在安装之前对插件的代码进行静态代码分析?
我正在开发一个涉及推送通知的iPhone应用程序.正如我在许多文档和教程中看到的那样,它建议用in注册推送通知
application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
Run Code Online (Sandbox Code Playgroud)
如下:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert| UIRemoteNotificationTypeBadge| UIRemoteNotificationTypeSound];
...
}
Run Code Online (Sandbox Code Playgroud)
现在的问题是,如果应用程序没有运行(即使在后台),当推送到来时,它无法处理推送消息,但如果我再次从通知区域使用推送消息并再次午餐应用程序,我可以得到我的留言
我需要做些什么来让我的应用程序获得推送消息,即使它第一次吃午饭?
所以我正在开发一个测验Web应用程序.我想添加一个测验管理员可以设置的设置,以便用户在测验时只能打开1个窗口/标签.
这样做的原因是为了让它们在测验窗口/标签打开时不能像谷歌一样转动并回答答案.当然,他们总是可以打开不同的浏览器并按照这种方式进行操作,但仍然认为让它们启用是一个很好的功能.
现在我不知道这是否属于安全沙箱违规(因此根本不可用),但因为我只想检测是否有另一个选项卡或窗口打开而没有得到关于选项卡/窗口的实际信息我希望这有点可能使用javascript.
我有一个我正在研究的AIR应用程序,需要加载一个swf(总是来自localhost),它将访问它的父进程中的某些方法,反之亦然.我不关心在桌面应用程序中打开差距安全漏洞.我一直在寻找各种各样的实施,但仍然在每个实施的墙壁上.
我当前的设置加载在swf中并且它会播放但是我从沙箱中得到一个小错误,因为我与应用程序不在同一个.有谁知道如何通过这个错误,所以AIR应用程序和瑞士法郎之间有完全的自由?
*安全沙箱违规*
SecurityDomain'http://localhost/test.swf'尝试访问不兼容的上下文'app:/Test_Player.swf'
public function loadSWF():void {
//var context:LoaderContext = new LoaderContext();
//context.checkPolicyFile = true;
//context.applicationDomain = ApplicationDomain.currentDomain;
//context.securityDomain = SecurityDomain.currentDomain;
var req:URLRequest = new URLRequest(swfURL);
adLoader = new Loader();
videoCanvas.rawChildren.addChild(adLoader);
loader.contentLoaderInfo.addEventListener(Event.INIT, adLoadedHandler, false, 0, true);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError, false, 0, true);
//loader.load(req, context);
loader.load(req);
}
Run Code Online (Sandbox Code Playgroud) 我为我的应用程序创建了一个QuickLook Generator,并Containers/com.Aravindh.EgApp/Data/Library/QuickLook/QuickLookGenerator.qlgenerator使用以下代码将quicklook生成器复制到此位置.
NSString *path1 = [[NSBundle mainBundle] pathForResource:@"QuickLookGenerator" ofType:@"qlgenerator"];
NSError *error;
NSArray *paths = [[NSFileManager defaultManager] URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask];
NSString *librayPath = [[paths objectAtIndex:0] path];
librayPath = [NSString stringWithFormat:@"%@/Quicklook/QuickLookGenerator.qlgenerator",librayPath];
if(![[NSFileManager defaultManager] fileExistsAtPath:librayPath]) {
[[NSFileManager defaultManager] copyItemAtPath:path1 toPath:librayPath error:&error];
}
Run Code Online (Sandbox Code Playgroud)
但是我收到了这个错误:
Error Domain=NSCocoaErrorDomain Code=513 "“QuickLookGenerator.qlgenerator” couldn’t be copied because you don’t have permission to access “QuickLook”." UserInfo=0x101518250 {NSSourceFilePathErrorKey=/Users/Aravindh/Desktop/EgApp/EgApp/build/Release/EgApp.app/Contents/Resources/QuickLookGenerator.qlgenerator, NSUserStringVariant=(
Copy
), NSDestinationFilePath=/Users/Aravindh/Library/Containers/com.Aravindh.EgApp/Data/Library/Quicklook/QuickLookGenerator.qlgenerator, NSFilePath=/Users/Aravindh/Desktop/EgApp/EgApp/build/Release/EgApp.app/Contents/Resources/QuickLookGenerator.qlgenerator, NSUnderlyingError=0x10154dbb0 "The operation couldn’t be completed. Operation not permitted"}
Run Code Online (Sandbox Code Playgroud)
我是否必须在Entitlementes.plist中提及任何内容?如何在SandBox环境中安装QuickLookGenerator?
我正在转换图像大小,然后我将新文件保存到原始图像文件所在的同一目录中.
我只能设置"images"目录的权限.如果我的应用程序需要选择该目录中的图像,它将按预期工作.如果我选择另一个目录中的图像(例如用户创建的目录文件夹),则不会显示新图像.我在App Sandbox中看到的只是"用户选择的文件"目录,"图像"目录,"下载"目录,"图片"目录,"音乐"目录和"电影"目录.
有没有办法以编程方式提供此权限?
didCompletePayment委托方法确认我的付款状态已获批准:
CurrencyCode: USD
Amount: 1.95
Short Description: avocado
Intent: sale
Processable: Already processed
Display: $1.95
Confirmation: {
client = {
environment = mock;
"paypal_sdk_version" = "2.8.3";
platform = iOS;
"product_name" = "PayPal iOS SDK";
};
response = {
"create_time" = "2015-02-10T16:17:43Z";
id = "PAY-NONETWORKPAYIDEXAMPLE123";
intent = sale;
state = approved;
};
"response_type" = payment;
}
Details: (null)
Shipping Address: (null)
Invoice Number: (null)
Custom: (null)
Soft Descriptor: (null)
BN code: (null)
Run Code Online (Sandbox Code Playgroud)
但是,当我在Developer.PayPal.com上使用我的仪表板时,我的交易页面上没有显示任何内容.
关于我可能遗失或做错的任何想法?此时付款是否已完全验证,还是我必须在服务器上执行更多逻辑验证?在创建付款并在委托回调中获取其信息之前,我已经获得了承载访问令牌,但我不确定我应该如何处理此令牌.
谢谢,
我今天获得Instagram api并直接添加我的网站,我看到写道:
客户状态:沙箱模式 GO LIVE
我不能点击''GO LIVE''按钮为什么?
我在Heroku中有一个phpfiddle应用程序,用户可以使用任何PHP代码.
基本上这是应用程序结构(示例):
/app/
|
|--fiddle/ <-- contains all php fiddles generated by the user.
| |
| |-- abcde/ <-- random directory.
| |
| |--index.php <--- custom user code.
|
|--app.php <--- entry point and main app file.
Run Code Online (Sandbox Code Playgroud)
用户可以在他们的帐户中有许多phpfiddles,每个phpfiddles对应一个随机目录,index.php文件<iframe>稍后执行.
如何避免任何应用程序用户可以通过index.php文件创建/列出/删除其随机目录之外的任何文件/目录?
我目前的解决方案是解析PHP的用户代码(之前执行它),并检测像所有可能的功能file_put_contents(),unlink(),mkdir(),dir(),rmdir()和其他人,但限制了测试的范围,我需要的用户可以玩这些的内部功能方面.
我担心我需要根据资源执行"动态"设置文件系统的特殊权限(我猜).怎么做?有可能实现吗?
编辑:目前php.net/runkit尚不支持PHP 7(https://github.com/zenovich/runkit/issues/87),在这种情况下是必需的.