#587: M1598543 M1607902 disable remote jars
This commit is contained in:
parent
cc2e336b2f
commit
cfb4b1e08a
|
@ -83,7 +83,7 @@ int32_t VideoCaptureMacQTKit::Init(
|
||||||
|
|
||||||
const int32_t nameLength =
|
const int32_t nameLength =
|
||||||
(int32_t) strlen((char*)iDeviceUniqueIdUTF8);
|
(int32_t) strlen((char*)iDeviceUniqueIdUTF8);
|
||||||
if(nameLength>kVideoCaptureUniqueNameLength)
|
if(nameLength >= kVideoCaptureUniqueNameLength)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Store the device name
|
// Store the device name
|
||||||
|
|
|
@ -73,7 +73,7 @@ int32_t VideoCaptureMacQuickTime::Init(
|
||||||
|
|
||||||
const int32_t nameLength =
|
const int32_t nameLength =
|
||||||
(int32_t) strlen((char*) deviceUniqueIdUTF8);
|
(int32_t) strlen((char*) deviceUniqueIdUTF8);
|
||||||
if (nameLength > kVideoCaptureUniqueNameLength)
|
if (nameLength >= kVideoCaptureUniqueNameLength)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Store the device name
|
// Store the device name
|
||||||
|
|
|
@ -80,7 +80,7 @@ int32_t ScreenDeviceInfoImpl::GetDeviceName(uint32_t deviceNumber,
|
||||||
|
|
||||||
const char *deviceName = desktopDisplayDevice.getDeviceName();
|
const char *deviceName = desktopDisplayDevice.getDeviceName();
|
||||||
len = deviceName ? strlen(deviceName) : 0;
|
len = deviceName ? strlen(deviceName) : 0;
|
||||||
if (len && deviceNameUTF8 && len <= deviceNameUTF8Length) {
|
if (len && deviceNameUTF8 && len < deviceNameUTF8Length) {
|
||||||
memcpy(deviceNameUTF8,
|
memcpy(deviceNameUTF8,
|
||||||
deviceName,
|
deviceName,
|
||||||
len);
|
len);
|
||||||
|
@ -88,7 +88,7 @@ int32_t ScreenDeviceInfoImpl::GetDeviceName(uint32_t deviceNumber,
|
||||||
|
|
||||||
const char *deviceUniqueId = desktopDisplayDevice.getUniqueIdName();
|
const char *deviceUniqueId = desktopDisplayDevice.getUniqueIdName();
|
||||||
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
||||||
if (len && deviceUniqueIdUTF8 && len <= deviceUniqueIdUTF8Length) {
|
if (len && deviceUniqueIdUTF8 && len < deviceUniqueIdUTF8Length) {
|
||||||
memcpy(deviceUniqueIdUTF8,
|
memcpy(deviceUniqueIdUTF8,
|
||||||
deviceUniqueId,
|
deviceUniqueId,
|
||||||
len);
|
len);
|
||||||
|
@ -174,13 +174,13 @@ int32_t AppDeviceInfoImpl::GetDeviceName(uint32_t deviceNumber,
|
||||||
|
|
||||||
const char *deviceName = desktopApplication.getProcessAppName();
|
const char *deviceName = desktopApplication.getProcessAppName();
|
||||||
len = deviceName ? strlen(deviceName) : 0;
|
len = deviceName ? strlen(deviceName) : 0;
|
||||||
if (len && len <= deviceNameUTF8Length) {
|
if (len && len < deviceNameUTF8Length) {
|
||||||
memcpy(deviceNameUTF8, deviceName, len);
|
memcpy(deviceNameUTF8, deviceName, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *deviceUniqueId = desktopApplication.getUniqueIdName();
|
const char *deviceUniqueId = desktopApplication.getUniqueIdName();
|
||||||
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
||||||
if (len && deviceUniqueIdUTF8 && len <= deviceUniqueIdUTF8Length) {
|
if (len && deviceUniqueIdUTF8 && len < deviceUniqueIdUTF8Length) {
|
||||||
memcpy(deviceUniqueIdUTF8,
|
memcpy(deviceUniqueIdUTF8,
|
||||||
deviceUniqueId,
|
deviceUniqueId,
|
||||||
len);
|
len);
|
||||||
|
@ -276,7 +276,7 @@ int32_t WindowDeviceInfoImpl::GetDeviceName(uint32_t deviceNumber,
|
||||||
|
|
||||||
const char *deviceName = desktopDisplayDevice.getDeviceName();
|
const char *deviceName = desktopDisplayDevice.getDeviceName();
|
||||||
len = deviceName ? strlen(deviceName) : 0;
|
len = deviceName ? strlen(deviceName) : 0;
|
||||||
if (len && deviceNameUTF8 && len <= deviceNameUTF8Length) {
|
if (len && deviceNameUTF8 && len < deviceNameUTF8Length) {
|
||||||
memcpy(deviceNameUTF8,
|
memcpy(deviceNameUTF8,
|
||||||
deviceName,
|
deviceName,
|
||||||
len);
|
len);
|
||||||
|
@ -284,7 +284,7 @@ int32_t WindowDeviceInfoImpl::GetDeviceName(uint32_t deviceNumber,
|
||||||
|
|
||||||
const char *deviceUniqueId = desktopDisplayDevice.getUniqueIdName();
|
const char *deviceUniqueId = desktopDisplayDevice.getUniqueIdName();
|
||||||
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
len = deviceUniqueId ? strlen(deviceUniqueId) : 0;
|
||||||
if (len && deviceUniqueIdUTF8 && len <= deviceUniqueIdUTF8Length) {
|
if (len && deviceUniqueIdUTF8 && len < deviceUniqueIdUTF8Length) {
|
||||||
memcpy(deviceUniqueIdUTF8,
|
memcpy(deviceUniqueIdUTF8,
|
||||||
deviceUniqueId,
|
deviceUniqueId,
|
||||||
len);
|
len);
|
||||||
|
|
|
@ -1523,12 +1523,8 @@ pref("dom.server-events.default-reconnection-time", 5000); // in milliseconds
|
||||||
// by the jar channel.
|
// by the jar channel.
|
||||||
pref("network.jar.open-unsafe-types", false);
|
pref("network.jar.open-unsafe-types", false);
|
||||||
// If true, loading remote JAR files using the jar: protocol will be prevented.
|
// If true, loading remote JAR files using the jar: protocol will be prevented.
|
||||||
#ifdef RELEASE_BUILD
|
// See also bug 1255139 if you have issues with Lotus Notes.
|
||||||
// Keep allowing remote JAR files for IBM iNotes (see bug 1255139) for now.
|
|
||||||
pref("network.jar.block-remote-files", false);
|
pref("network.jar.block-remote-files", false);
|
||||||
#else
|
|
||||||
pref("network.jar.block-remote-files", true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This preference, if true, causes all UTF-8 domain names to be normalized to
|
// This preference, if true, causes all UTF-8 domain names to be normalized to
|
||||||
// punycode. The intention is to allow UTF-8 domain names as input, but never
|
// punycode. The intention is to allow UTF-8 domain names as input, but never
|
||||||
|
|
|
@ -279,26 +279,33 @@ DatabasePathFromWALPath(const char *zWALName)
|
||||||
MOZ_CRASH("Should never get here!");
|
MOZ_CRASH("Should never get here!");
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<QuotaObject>
|
already_AddRefed<QuotaObject> GetQuotaObjectFromName(const char *zName,
|
||||||
GetQuotaObjectFromNameAndParameters(const char *zName,
|
bool deriveFromWal) {
|
||||||
const char *zURIParameterKey)
|
// From Sqlite 3.31.0 the zName format changed to work consistently across
|
||||||
{
|
// database, wal and journal names.
|
||||||
MOZ_ASSERT(zName);
|
// We must support both ways because this code will be uplifted to ensure
|
||||||
MOZ_ASSERT(zURIParameterKey);
|
// that if system Sqlite is upgraded before us, we keep working properly.
|
||||||
|
// Once the Firefox minimum Sqlite version is 3.31.0, we can remove the else
|
||||||
|
// branch, DatabasePathFromWALPath, and the deriveFromWal argument.
|
||||||
|
const char* filename = zName;
|
||||||
|
if (deriveFromWal && sqlite3_libversion_number() < 3031000) {
|
||||||
|
filename = DatabasePathFromWALPath(zName);
|
||||||
|
}
|
||||||
|
MOZ_ASSERT(filename);
|
||||||
|
|
||||||
const char *persistenceType =
|
const char *persistenceType =
|
||||||
sqlite3_uri_parameter(zURIParameterKey, "persistenceType");
|
sqlite3_uri_parameter(filename, "persistenceType");
|
||||||
if (!persistenceType) {
|
if (!persistenceType) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *group = sqlite3_uri_parameter(zURIParameterKey, "group");
|
const char *group = sqlite3_uri_parameter(filename, "group");
|
||||||
if (!group) {
|
if (!group) {
|
||||||
NS_WARNING("SQLite URI had 'persistenceType' but not 'group'?!");
|
NS_WARNING("SQLite URI had 'persistenceType' but not 'group'?!");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *origin = sqlite3_uri_parameter(zURIParameterKey, "origin");
|
const char *origin = sqlite3_uri_parameter(filename, "origin");
|
||||||
if (!origin) {
|
if (!origin) {
|
||||||
NS_WARNING("SQLite URI had 'persistenceType' and 'group' but not "
|
NS_WARNING("SQLite URI had 'persistenceType' and 'group' but not "
|
||||||
"'origin'?!");
|
"'origin'?!");
|
||||||
|
@ -327,16 +334,7 @@ MaybeEstablishQuotaControl(const char *zName,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(zName);
|
pFile->quotaObject = GetQuotaObjectFromName(zName, flags & SQLITE_OPEN_WAL);
|
||||||
|
|
||||||
const char *zURIParameterKey = (flags & SQLITE_OPEN_WAL) ?
|
|
||||||
DatabasePathFromWALPath(zName) :
|
|
||||||
zName;
|
|
||||||
|
|
||||||
MOZ_ASSERT(zURIParameterKey);
|
|
||||||
|
|
||||||
pFile->quotaObject =
|
|
||||||
GetQuotaObjectFromNameAndParameters(zName, zURIParameterKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -709,10 +707,7 @@ xDelete(sqlite3_vfs* vfs, const char *zName, int syncDir)
|
||||||
RefPtr<QuotaObject> quotaObject;
|
RefPtr<QuotaObject> quotaObject;
|
||||||
|
|
||||||
if (StringEndsWith(nsDependentCString(zName), NS_LITERAL_CSTRING("-wal"))) {
|
if (StringEndsWith(nsDependentCString(zName), NS_LITERAL_CSTRING("-wal"))) {
|
||||||
const char *zURIParameterKey = DatabasePathFromWALPath(zName);
|
quotaObject = GetQuotaObjectFromName(zName, true);
|
||||||
MOZ_ASSERT(zURIParameterKey);
|
|
||||||
|
|
||||||
quotaObject = GetQuotaObjectFromNameAndParameters(zName, zURIParameterKey);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = orig_vfs->xDelete(orig_vfs, zName, syncDir);
|
rc = orig_vfs->xDelete(orig_vfs, zName, syncDir);
|
||||||
|
|
Loading…
Reference in New Issue