@@ -283,11 +283,11 @@ { if (self != [OFHTTP class]) return; /* Opportunistically try loading ObjOpenSSL and ignore any errors. */ - OFDlOpen(@LIB_PREFIX @"objopenssl" @LIB_SUFFIX, OF_RTLD_LAZY); + OFDLOpen(@LIB_PREFIX @"objopenssl" @LIB_SUFFIX, OFDLOpenFlagLazy); } #endif - (instancetype)init { @@ -526,13 +526,18 @@ break; } } #ifdef OF_HAVE_SANDBOX - [sandbox unveilPath: (outputPath != nil - ? outputPath : OF_PATH_CURRENT_DIRECTORY) - permissions: (_continue ? @"rwc" : @"wc")]; + if (outputPath != nil) + [sandbox unveilPath: outputPath + permissions: (_continue ? @"rwc" : @"wc")]; + else + [sandbox unveilPath: [[OFFileManger defaultManager] + currentDirectoryPath] + permissions: (_continue ? @"rwc" : @"wc")]; + /* In case we use ObjOpenSSL for https later */ [sandbox unveilPath: @"/etc/ssl" permissions: @"r"]; sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox];