Compare commits

...

12 Commits
v16.0 ... v16.4

Author SHA1 Message Date
Andrey Prygunkov
1d77852bea updated version string to "16.4" 2015-12-05 12:24:20 +01:00
Andrey Prygunkov
15a5d056ed #118: merge 80653a8dad: fixed resource (socket) leak
, which may cause “too many open files” errors with a possible crash.
2015-12-05 11:51:30 +01:00
Andrey Prygunkov
050dc8d55f updated version string to "16.3" 2015-10-29 20:59:27 +01:00
Andrey Prygunkov
4a5063c14e #100: fixed: downloads may sometimes fail due to incorrect decoding of articles 2015-10-28 18:09:29 +01:00
Andrey Prygunkov
665645b510 updated version string to "16.2" 2015-10-24 15:26:50 +02:00
Andrey Prygunkov
eb87111204 fixed #100: workaround to deal with malformed responses
…which still may contain useful data.
2015-10-24 15:13:04 +02:00
Andrey Prygunkov
94aa547a85 updated version string to "16.1" 2015-10-19 22:17:18 +02:00
Andrey Prygunkov
dfa18b50a4 corrected file permissions 2015-10-19 22:01:52 +02:00
Andrey Prygunkov
2820ee4bc5 fixed #95: starting nzbget from setup (Windows)
When launching NZBGet at the end of setup the program is now started
with regular user permissions.
2015-10-19 21:55:21 +02:00
Andrey Prygunkov
c9ff56cc7e #89: fixed unpack failure on certain CPUs
unrar shipped with nzbget was compiled in optimization mode O3. In that
mode GCC activates loop vectorization. On x86_64 architecture that
caused the usage of CPU commands from extended set SSSE3. Some older
AMD processors doesn’t support SSSE3, which lead to abortion with
“illegal instruction”-message. Now using O2-mode; that solves the
issues.
2015-10-19 21:53:06 +02:00
Andrey Prygunkov
9ea9da8d33 #77: fixed issues with reverse proxies (3)
merging into 16.x-branch: when very long headers were sent from the
proxy, in particular if htdigest authorization were used.
2015-10-19 21:52:33 +02:00
Andrey Prygunkov
297a966da3 #77: fixed issues with reverse proxies
merging into 16.x-branch: removing of authorization-header wasn’t such
a good idea.
2015-10-19 21:51:23 +02:00
13 changed files with 67 additions and 23 deletions

View File

@@ -1,3 +1,22 @@
nzbget-16.4:
- fixed resource (socket) leak which may cause "too many open files"
errors with a possible crash.
nzbget-16.3:
- fixed: certain downloads may fail due to a bug in the workaround
implemented in v16.2.
nzbget-16.2:
- implemented workaround to deal with malformed news server responses,
which may still contain useful data.
nzbget-16.1:
- fixed issues with reverse proxies;
- fixed unpack failure on older AMD CPUs, when installed via
universal Linux installer;
- fixed: when the program was started from setup the default directories
were created with wrong permission (Windows only).
nzbget-16.0:
- moved project hosting to GitHub:
- moved source code repository from subversion to git;

20
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for nzbget 16.0.
# Generated by GNU Autoconf 2.61 for nzbget 16.4.
#
# Report bugs to <hugbug@users.sourceforge.net>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='nzbget'
PACKAGE_TARNAME='nzbget'
PACKAGE_VERSION='16.0'
PACKAGE_STRING='nzbget 16.0'
PACKAGE_VERSION='16.4'
PACKAGE_STRING='nzbget 16.4'
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
ac_unique_file="daemon/main/nzbget.cpp"
@@ -1223,7 +1223,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures nzbget 16.0 to adapt to many kinds of systems.
\`configure' configures nzbget 16.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1289,7 +1289,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of nzbget 16.0:";;
short | recursive ) echo "Configuration of nzbget 16.4:";;
esac
cat <<\_ACEOF
@@ -1421,7 +1421,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
nzbget configure 16.0
nzbget configure 16.4
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1435,7 +1435,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by nzbget $as_me 16.0, which was
It was created by nzbget $as_me 16.4, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2105,7 +2105,7 @@ fi
# Define the identity of the package.
PACKAGE='nzbget'
VERSION='16.0'
VERSION='16.4'
cat >>confdefs.h <<_ACEOF
@@ -10642,7 +10642,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by nzbget $as_me 16.0, which was
This file was extended by nzbget $as_me 16.4, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -10695,7 +10695,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
nzbget config.status 16.0
nzbget config.status 16.4
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -23,7 +23,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(nzbget, 16.0, hugbug@users.sourceforge.net)
AC_INIT(nzbget, 16.4, hugbug@users.sourceforge.net)
AC_CONFIG_AUX_DIR(posix)
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([daemon/main/nzbget.cpp])

View File

@@ -615,6 +615,11 @@ bool Connection::DoConnect()
}
triedAddr.push_back(sa);
if (m_iSocket != INVALID_SOCKET)
{
closesocket(m_iSocket);
}
m_iSocket = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
#ifdef WIN32
SetHandleInformation((HANDLE)m_iSocket, HANDLE_FLAG_INHERIT, 0);

View File

@@ -452,9 +452,16 @@ ArticleDownloader::EStatus ArticleDownloader::Download()
}
}
}
else if (m_eFormat == Decoder::efUnknown && g_pOptions->GetDecode())
if (m_eFormat == Decoder::efUnknown && g_pOptions->GetDecode())
{
m_eFormat = Decoder::DetectFormat(line, iLen);
m_eFormat = Decoder::DetectFormat(line, iLen, bBody);
if (m_eFormat != Decoder::efUnknown)
{
// sometimes news servers misbehave and send article body without new line separator between headers and body
// if we found decoder signature we know the body is already arrived
bBody = true;
}
}
// write to output file

View File

@@ -65,14 +65,14 @@ void Decoder::Clear()
m_szArticleFilename = NULL;
}
Decoder::EFormat Decoder::DetectFormat(const char* buffer, int len)
Decoder::EFormat Decoder::DetectFormat(const char* buffer, int len, bool inBody)
{
if (!strncmp(buffer, "=ybegin ", 8))
{
return efYenc;
}
if ((len == 62 || len == 63) && (buffer[62] == '\n' || buffer[62] == '\r') && *buffer == 'M')
if (inBody && (len == 62 || len == 63) && (buffer[62] == '\n' || buffer[62] == '\r') && *buffer == 'M')
{
return efUx;
}

View File

@@ -58,7 +58,7 @@ public:
virtual void Clear();
virtual int DecodeBuffer(char* buffer, int len) = 0;
const char* GetArticleFilename() { return m_szArticleFilename; }
static EFormat DetectFormat(const char* buffer, int len);
static EFormat DetectFormat(const char* buffer, int len, bool inBody);
};
class YDecoder: public Decoder

View File

@@ -157,7 +157,7 @@ void WebProcessor::Execute()
void WebProcessor::ParseHeaders()
{
// reading http header
char szBuffer[256+1];
char szBuffer[1024];
m_iContentLen = 0;
while (char* p = m_pConnection->ReadLine(szBuffer, sizeof(szBuffer), NULL))
{

View File

@@ -68,7 +68,7 @@
/* Define to 1 if you have the <regex.h> header file. */
#define HAVE_REGEX_H 1
#define VERSION "16.0"
#define VERSION "16.4"
/* Suppress warnings */
#define _CRT_SECURE_NO_DEPRECATE

View File

@@ -167,10 +167,10 @@ for TARGET in $TARGETS; do
CXX=$TOOLCHAIN_ROOT/output/host/usr/bin/$ARCH-linux-g++ \
CC=$TOOLCHAIN_ROOT/output/host/usr/bin/$ARCH-linux-gcc \
STRIP=$TOOLCHAIN_ROOT/output/host/usr/bin/$ARCH-linux-strip \
CXXFLAGS=-O3 \
CXXFLAGS=-O2 \
LDFLAGS=-static \
make $BUILDTARGET
cp $EXEDIR$EXENAME ../../setup/$EXENAME-$TARGET
cp $LICENSE ../../setup/license-$UNPACKER.txt

0
tests/queue/NZBFileTest.cpp Executable file → Normal file
View File

View File

@@ -491,8 +491,6 @@ var RPC = (new function($)
if (XAuthToken !== undefined)
{
xhr.setRequestHeader('X-Auth-Token', XAuthToken);
// Remove default authorization header to improve security (some browsers may still send it)
xhr.setRequestHeader('Authorization', '');
}
if (timeout)

View File

@@ -36,6 +36,7 @@
!include "MUI2.nsh"
!include "FileFunc.nsh"
!include "LogicLib.nsh"
!include "WinVer.nsh"
;--------------------------------
;General
@@ -65,7 +66,8 @@ RequestExecutionLevel admin
!define MUI_WELCOMEFINISHPAGE_BITMAP "install.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "uninstall.bmp"
!define MUI_FINISHPAGE_RUN "$INSTDIR\nzbget.exe"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION RunAction
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
@@ -167,6 +169,19 @@ System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
FunctionEnd
Function RunAction
${If} ${AtLeastWinVista}
; Starting NZBGet with standard user privileges
Exec "runas /trustlevel:0x20000 $\"$INSTDIR\nzbget.exe$\""
${Else}
; Starting NZBGet with current privileges
Exec "$INSTDIR\nzbget.exe"
${EndIf}
FunctionEnd
;--------------------------------
;Uninstaller Section