Add --enable-unspecified_server
Add --enable-unspecified_server configure option to set to "Unspecified" the OS name, OS version, product name and product version normally contained in the SERVER header as this could be used by an attacker.
This commit is contained in:
parent
df27ba505f
commit
49af91fe48
@ -2,6 +2,14 @@
|
|||||||
Version 1.6.17
|
Version 1.6.17
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2012-03-30 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
|
Add --enable-unspecified_server
|
||||||
|
|
||||||
|
Add --enable-unspecified_server configure option to set to "Unspecified"
|
||||||
|
the OS name, OS version, product name and product version normally
|
||||||
|
contained in the SERVER header as this could be used by an attacker.
|
||||||
|
|
||||||
2012-03-29 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
2012-03-29 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||||
|
|
||||||
Removing implicit casts in miniserver.c
|
Removing implicit casts in miniserver.c
|
||||||
|
@ -129,6 +129,9 @@
|
|||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
/* #undef UPNP_ENABLE_IPV6 */
|
/* #undef UPNP_ENABLE_IPV6 */
|
||||||
|
|
||||||
|
/* see upnpconfig.h */
|
||||||
|
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
|
|
||||||
/* see upnpconfig.h */
|
/* see upnpconfig.h */
|
||||||
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
|
#define UPNP_ENABLE_NOTIFICATION_REORDERING 1
|
||||||
|
|
||||||
|
@ -128,5 +128,9 @@
|
|||||||
* (i.e. configure --enable-ipv6) */
|
* (i.e. configure --enable-ipv6) */
|
||||||
/* #undef UPNP_ENABLE_IPV6 */
|
/* #undef UPNP_ENABLE_IPV6 */
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with unspecified SERVER
|
||||||
|
* header (i.e. configure --enable-unspecified_server) */
|
||||||
|
/* #undef UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
|
|
||||||
#endif /* UPNP_CONFIG_H */
|
#endif /* UPNP_CONFIG_H */
|
||||||
|
|
||||||
|
@ -434,6 +434,11 @@ if test "x$enable_ipv6" = xyes ; then
|
|||||||
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
|
AC_DEFINE(UPNP_ENABLE_IPV6, 1, [see upnpconfig.h])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RT_BOOL_ARG_ENABLE([unspecified_server], [no], [unspecified SERVER header])
|
||||||
|
if test "x$enable_unspecified_server" = xyes ; then
|
||||||
|
AC_DEFINE(UPNP_ENABLE_UNSPECIFIED_SERVER, 1, [see upnpconfig.h])
|
||||||
|
fi
|
||||||
|
|
||||||
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
|
RT_BOOL_ARG_ENABLE([notification_reordering], [yes], [GENA notification reordering in gena_device.c])
|
||||||
if test "x$enable_notification_reordering" = xyes ; then
|
if test "x$enable_notification_reordering" = xyes ; then
|
||||||
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
|
AC_DEFINE(UPNP_ENABLE_NOTIFICATION_REORDERING, 1, [see upnpconfig.h])
|
||||||
|
@ -127,5 +127,9 @@
|
|||||||
* (i.e. configure --enable-ipv6) */
|
* (i.e. configure --enable-ipv6) */
|
||||||
#undef UPNP_ENABLE_IPV6
|
#undef UPNP_ENABLE_IPV6
|
||||||
|
|
||||||
|
/** Defined to 1 if the library has been compiled with unspecified SERVER
|
||||||
|
* header (i.e. configure --enable-unspecified_server) */
|
||||||
|
#undef UPNP_ENABLE_UNSPECIFIED_SERVER
|
||||||
|
|
||||||
#endif /* UPNP_CONFIG_H */
|
#endif /* UPNP_CONFIG_H */
|
||||||
|
|
||||||
|
@ -2118,6 +2118,9 @@ int http_OpenHttpGetEx(
|
|||||||
/* 'info' should have a size of at least 100 bytes */
|
/* 'info' should have a size of at least 100 bytes */
|
||||||
void get_sdk_info(OUT char *info, IN size_t infoSize)
|
void get_sdk_info(OUT char *info, IN size_t infoSize)
|
||||||
{
|
{
|
||||||
|
#ifdef UPNP_ENABLE_UNSPECIFIED_SERVER
|
||||||
|
snprintf(info, infoSize, "Unspecified, UPnP/1.0, Unspecified\r\n");
|
||||||
|
#else /* UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
OSVERSIONINFO versioninfo;
|
OSVERSIONINFO versioninfo;
|
||||||
versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
versioninfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
@ -2141,5 +2144,6 @@ void get_sdk_info(OUT char *info, IN size_t infoSize)
|
|||||||
"%s/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
"%s/%s, UPnP/1.0, Portable SDK for UPnP devices/"
|
||||||
PACKAGE_VERSION "\r\n", sys_info.sysname, sys_info.release);
|
PACKAGE_VERSION "\r\n", sys_info.sysname, sys_info.release);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* UPNP_ENABLE_UNSPECIFIED_SERVER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user