Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libfilezilla for openSUSE:Factory checked in at 2024-02-09 23:52:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libfilezilla (Old) and /work/SRC/openSUSE:Factory/.libfilezilla.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libfilezilla" Fri Feb 9 23:52:49 2024 rev:55 rq:1145275 version:0.46.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libfilezilla/libfilezilla.changes 2023-10-24 20:09:41.751444655 +0200 +++ /work/SRC/openSUSE:Factory/.libfilezilla.new.1815/libfilezilla.changes 2024-02-09 23:53:11.512849162 +0100 @@ -1,0 +2,13 @@ +Thu Feb 8 15:25:26 UTC 2024 - Dominique Leuenberger <[email protected]> + +- Update to version 0.46.0: + + fz::process: Add io redirection mode that excluded stderr. + + fz::remove_file and remove_dir now take additional parameter + and return fz::result. + + Added transitional fz::file::read2 and fz::file::write2 + returning fz::rwresult, old read/write have been marked + deprecated. + + HTTP: Fix redirect if "Connection: close" header is set. +- Bump major to 42, following upstream sover bump. + +------------------------------------------------------------------- Old: ---- libfilezilla-0.45.0.tar.xz New: ---- libfilezilla-0.46.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libfilezilla.spec ++++++ --- /var/tmp/diff_new_pack.8qBL81/_old 2024-02-09 23:53:12.076869486 +0100 +++ /var/tmp/diff_new_pack.8qBL81/_new 2024-02-09 23:53:12.076869486 +0100 @@ -1,7 +1,7 @@ # # spec file for package libfilezilla # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,11 +16,11 @@ # -%define major 41 +%define major 42 %define libname %{name}%{major} %define develname %{name}-devel Name: libfilezilla -Version: 0.45.0 +Version: 0.46.0 Release: 0 Summary: C++ library for filezilla License: GPL-2.0-or-later @@ -78,8 +78,9 @@ %description -n %{develname} Files needed for development with %{name}. -# Need %%lang_package expanded for an extra conflict with an old library package + +# Need %%lang_package expanded for an extra conflict with an old library package %package lang # FIXME: consider using %%lang_package macro Summary: Translations for package %{name} ++++++ libfilezilla-0.45.0.tar.xz -> libfilezilla-0.46.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/NEWS new/libfilezilla-0.46.0/NEWS --- old/libfilezilla-0.45.0/NEWS 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/NEWS 2024-02-06 17:57:47.000000000 +0100 @@ -1,3 +1,10 @@ +0.46.0 (2024-02-06) + ++ fz::process: Add io redirection mode that excluded stderr ++ fz::remove_file and remove_dir now take additional parameter and return fz::result ++ Added transitional fz::file::read2 and fz::file::write2 returning fz::rwresult, old read/write have been marked deprecated +- HTTP: Fix redirect if "Connection: close" header is set + 0.45.0 (2023-10-11) + fz::hash_accumulator now also works with hmac_sha256 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/README new/libfilezilla-0.46.0/README --- old/libfilezilla-0.45.0/README 2023-01-12 10:41:17.000000000 +0100 +++ new/libfilezilla-0.46.0/README 2024-02-06 17:57:47.000000000 +0100 @@ -1,7 +1,7 @@ libfilezilla ------------- - Copyright (C) 2023 Tim Kosse + Copyright (C) 2015-2024 Tim Kosse https://lib.filezilla-project.org/ Overview diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/configure new/libfilezilla-0.46.0/configure --- old/libfilezilla-0.45.0/configure 2023-10-11 10:27:09.000000000 +0200 +++ new/libfilezilla-0.46.0/configure 2024-02-06 17:57:55.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libfilezilla 0.45.0. +# Generated by GNU Autoconf 2.71 for libfilezilla 0.46.0. # # Report bugs to <[email protected]>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='libfilezilla' PACKAGE_TARNAME='libfilezilla' -PACKAGE_VERSION='0.45.0' -PACKAGE_STRING='libfilezilla 0.45.0' +PACKAGE_VERSION='0.46.0' +PACKAGE_STRING='libfilezilla 0.46.0' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='https://lib.filezilla-project.org/' @@ -1477,7 +1477,7 @@ # 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 libfilezilla 0.45.0 to adapt to many kinds of systems. +\`configure' configures libfilezilla 0.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1548,7 +1548,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libfilezilla 0.45.0:";; + short | recursive ) echo "Configuration of libfilezilla 0.46.0:";; esac cat <<\_ACEOF @@ -1704,7 +1704,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libfilezilla configure 0.45.0 +libfilezilla configure 0.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2098,7 +2098,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libfilezilla $as_me 0.45.0, which was +It was created by libfilezilla $as_me 0.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3076,7 +3076,7 @@ # If any interfaces have been added since the last public release, then increment age. # If any interfaces have been removed or changed since the last public release, then set age to 0. # CURRENT:REVISION:AGE -LIBRARY_VERSION=41:0:0 +LIBRARY_VERSION=42:0:0 ac_config_headers="$ac_config_headers config/config.hpp" @@ -3597,7 +3597,7 @@ # Define the identity of the package. PACKAGE='libfilezilla' - VERSION='0.45.0' + VERSION='0.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -23854,7 +23854,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libfilezilla $as_me 0.45.0, which was +This file was extended by libfilezilla $as_me 0.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23923,7 +23923,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libfilezilla config.status 0.45.0 +libfilezilla config.status 0.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/configure.ac new/libfilezilla-0.46.0/configure.ac --- old/libfilezilla-0.45.0/configure.ac 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/configure.ac 2024-02-06 17:57:47.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libfilezilla],[0.45.0],[[email protected]],[],[https://lib.filezilla-project.org/]) +AC_INIT([libfilezilla],[0.46.0],[[email protected]],[],[https://lib.filezilla-project.org/]) # Update the version information only immediately before a public release of your software # If the library source code has changed at all since the last update, then increment revision (âc:r:aâ becomes âc:r+1:aâ). @@ -6,7 +6,7 @@ # If any interfaces have been added since the last public release, then increment age. # If any interfaces have been removed or changed since the last public release, then set age to 0. # CURRENT:REVISION:AGE -LIBRARY_VERSION=41:0:0 +LIBRARY_VERSION=42:0:0 AC_CONFIG_HEADERS([config/config.hpp]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/demos/impersonation.cpp new/libfilezilla-0.46.0/demos/impersonation.cpp --- old/libfilezilla-0.45.0/demos/impersonation.cpp 2022-02-03 10:53:39.000000000 +0100 +++ new/libfilezilla-0.46.0/demos/impersonation.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -144,7 +144,8 @@ fz::file f(fds.front()); fds.pop_front(); - assert(f.write("Hello world!\n", 13) == 13); + auto written = f.write2("Hello world!\n", 13); + assert(written && written.value_ == 13); std::cerr << "Parent: Wrote data to file\n"; b.consume(5); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/aio/reader.cpp new/libfilezilla-0.46.0/lib/aio/reader.cpp --- old/libfilezilla-0.45.0/lib/aio/reader.cpp 2023-04-12 14:41:33.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/aio/reader.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -319,16 +319,16 @@ if (remaining_ != nosize && to_read > remaining_) { to_read = remaining_; } - int64_t r = to_read ? file_.read(b->get(to_read), to_read) : 0; + rwresult r = to_read ? file_.read2(b->get(to_read), to_read) : rwresult{rwresult::none, 0}; l.lock(); if (quit_ || error_) { return; } - if (r < 0) { + if (!r) { error_ = true; break; } - else if (!r) { + else if (!r.value_) { if (remaining_ && remaining_ != nosize) { error_ = true; } @@ -337,9 +337,10 @@ } break; } - b->add(r); + + b->add(r.value_); if (remaining_ != nosize) { - remaining_ -= r; + remaining_ -= r.value_; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/aio/writer.cpp new/libfilezilla-0.46.0/lib/aio/writer.cpp --- old/libfilezilla-0.45.0/lib/aio/writer.cpp 2023-04-12 14:41:33.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/aio/writer.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -227,7 +227,7 @@ if (remove) { buffer_pool_.logger().log(logmsg::debug_verbose, L"Deleting empty file '%s'", name_); - remove_file(to_native(name_)); + remove_file(to_native(name_), false); } } } @@ -255,18 +255,18 @@ auto & b = buffers_.front(); while (!b->empty()) { l.unlock(); - int64_t written = file_.write(b->get(), b->size()); + rwresult written = file_.write2(b->get(), b->size()); l.lock(); if (quit_ || error_) { return; } - if (written <= 0) { + if (!written || !written.value_) { error_ = true; return; } - b->consume(static_cast<size_t>(written)); + b->consume(static_cast<size_t>(written.value_)); if (progress_cb_) { - progress_cb_(this, static_cast<uint64_t>(written)); + progress_cb_(this, static_cast<uint64_t>(written.value_)); } } bool const signal = buffers_.size() == max_buffers_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/file.cpp new/libfilezilla-0.46.0/lib/file.cpp --- old/libfilezilla-0.45.0/lib/file.cpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/file.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -1,9 +1,12 @@ #include "libfilezilla/libfilezilla.hpp" +#include "libfilezilla/buffer.hpp" #include "libfilezilla/file.hpp" #include "libfilezilla/time.hpp" +#include "libfilezilla/util.hpp" #ifdef FZ_WINDOWS #include "windows/security_descriptor_builder.hpp" +#include "libfilezilla/util.hpp" #else #include <errno.h> #include <sys/stat.h> @@ -100,6 +103,9 @@ if (fd_ == INVALID_HANDLE_VALUE) { auto const err = GetLastError(); switch (err) { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + return {result::nofile, err}; case ERROR_ACCESS_DENIED: return {result::noperm, err}; case ERROR_DISK_FULL: @@ -168,28 +174,32 @@ return !!SetEndOfFile(fd_); } -int64_t file::read(void *buf, int64_t count) +rwresult file::read2(void *buf, size_t count) { - int64_t ret = -1; - DWORD read = 0; - if (ReadFile(fd_, buf, static_cast<DWORD>(count), &read, nullptr)) { - ret = static_cast<int64_t>(read); + if (ReadFile(fd_, buf, clamped_cast<DWORD>(count), &read, nullptr)) { + return rwresult{static_cast<size_t>(read)}; } - return ret; + DWORD err = GetLastError(); + return rwresult{rwresult::other, err}; } -int64_t file::write(void const* buf, int64_t count) +rwresult file::write2(void const* buf, size_t count) { - int64_t ret = -1; - DWORD written = 0; - if (WriteFile(fd_, buf, static_cast<DWORD>(count), &written, nullptr)) { - ret = static_cast<int64_t>(written); + if (WriteFile(fd_, buf, clamped_cast<DWORD>(count), &written, nullptr)) { + return rwresult{static_cast<size_t>(written)}; } - return ret; + DWORD err = GetLastError(); + switch (err) { + case ERROR_DISK_FULL: + case ERROR_DISK_QUOTA_EXCEEDED: + return rwresult{rwresult::nospace, err}; + default: + return rwresult{rwresult::other, err}; + } } bool file::opened() const @@ -197,14 +207,29 @@ return fd_ != INVALID_HANDLE_VALUE; } -bool remove_file(native_string const& name) +result remove_file(native_string const& name, bool missing_file_is_error) { - bool ret = DeleteFileW(name.c_str()) != 0; - if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) { - ret = true; + if (name.empty()) { + return {result::invalid, 0}; } - return ret; + if (DeleteFileW(name.c_str()) != 0) { + return {result::ok}; + } + + DWORD err = GetLastError(); + switch (err) { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + if (missing_file_is_error) { + return {result::nofile, err}; + } + return {result::ok}; + case ERROR_ACCESS_DENIED: + return {result::noperm, err}; + default: + return {result::other, err}; + } } bool file::fsync() @@ -271,6 +296,8 @@ if (fd_ == -1) { int const err = errno; switch (err) { + case ENOENT: + return {result::nofile, err}; case EACCES: return {result::noperm, err}; case EDQUOT: @@ -354,24 +381,51 @@ return ret; } -int64_t file::read(void *buf, int64_t count) +rwresult file::read2(void *buf, size_t count) { - int64_t ret; + ssize_t ret; do { ret = ::read(fd_, buf, count); } while (ret == -1 && (errno == EAGAIN || errno == EINTR)); - return ret; + if (ret >= 0) { + return rwresult{static_cast<size_t>(ret)}; + } + + rwresult::raw_t err = errno; + switch (err) { + case EBADF: + case EINVAL: + case EFAULT: + return rwresult{rwresult::invalid, err}; + default: + return rwresult{rwresult::other, err}; + } } -int64_t file::write(void const* buf, int64_t count) +rwresult file::write2(void const* buf, size_t count) { - int64_t ret; + ssize_t ret; do { ret = ::write(fd_, buf, count); } while (ret == -1 && (errno == EAGAIN || errno == EINTR)); - return ret; + if (ret >= 0) { + return rwresult{static_cast<size_t>(ret)}; + } + + rwresult::raw_t err = errno; + switch (err) { + case EBADF: + case EINVAL: + case EFAULT: + return rwresult{rwresult::invalid, err}; + case EDQUOT: + case ENOSPC: + return rwresult{rwresult::nospace, err}; + default: + return rwresult{rwresult::other, err}; + } } bool file::opened() const @@ -379,13 +433,33 @@ return fd_ != -1; } -bool remove_file(native_string const& name) +result remove_file(native_string const& name, bool missing_file_is_error) { - bool ret = unlink(name.c_str()) == 0; - if (!ret && errno == ENOENT) { - ret = true; + if (name.empty()) { + return {result::invalid, 0}; + } + + if (!unlink(name.c_str())) { + return {result::ok}; + } + int err = errno; + switch (errno) { + case ENOENT: + if (missing_file_is_error) { + return {result::nofile, err}; + } + return {result::ok}; + case EISDIR: + return {result::nofile, err}; + case EACCES: + case EPERM: + return {result::noperm, err}; + case EINVAL: + case ENAMETOOLONG: + return {result::invalid, err}; + default: + return {result::other, err}; } - return ret; } bool file::fsync() @@ -409,7 +483,51 @@ times[1].tv_nsec = t.get_milliseconds() * 1000000; return futimens(fd_, times) == 0; } - #endif +rwresult read_file(fz::file & f, buffer & out, size_t max_size) +{ + if (std::numeric_limits<size_t>::max() - max_size > out.size()) { + return rwresult{rwresult::invalid, 0}; + } + + auto s = f.size(); + if (s >= 0) { + if (cmp_less(max_size, s)) { + return rwresult{rwresult::nospace, {}}; + } + } + + size_t old_size = out.size(); + while (max_size) { + size_t to_read = std::min(size_t(1024 * 128), max_size); + rwresult read = f.read2(out.get(to_read), to_read); + if (!read) { + out.resize(old_size); + return read; + } + if (!read.value_) { + break; + } + out.add(read.value_); + max_size -= read.value_; + } + + if (!max_size) { + // Check for EOF and fail if file is larger. + uint8_t tmp{}; + rwresult read = f.read2(&tmp, 1); + if (!read) { + out.resize(old_size); + return read; + } + if (read.value_) { + out.resize(old_size); + return rwresult{rwresult::nospace, {}}; + } + } + + return rwresult{out.size() - old_size}; +} + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/http/client.cpp new/libfilezilla-0.46.0/lib/http/client.cpp --- old/libfilezilla-0.45.0/lib/http/client.cpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/http/client.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -560,7 +560,7 @@ requests_.pop_front(); read_state_ = read_state(); if (send_pos_) { - if (!socket_) { + if (!socket_ && (send_pos_ > 1 || request_send_state_ != request_send_state::none)) { logger_.log(logmsg::debug_warning, "Server refused keep-alive, but we already sent the next request(s). Must fail the other requests now."sv); return continuation::error; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/libfilezilla/file.hpp new/libfilezilla-0.46.0/lib/libfilezilla/file.hpp --- old/libfilezilla-0.45.0/lib/libfilezilla/file.hpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/libfilezilla/file.hpp 2024-02-06 17:57:47.000000000 +0100 @@ -161,7 +161,13 @@ * * \note Reading less than \c count octets can happen at any time, it does not indicate EOF. */ - int64_t read(void *buf, int64_t count); + rwresult read2(void *buf, size_t count); + + [[deprecated]] + inline int64_t read(void *buf, int64_t count) { + rwresult res = read2(buf, static_cast<size_t>(count)); + return res ? res.value_ : -1; + } /** \brief Write data to file * @@ -173,7 +179,13 @@ * \return >=0 The number of octets written to the file. It may be less than \c count. * \return -1 on error */ - int64_t write(void const* buf, int64_t count); + rwresult write2(void const* buf, size_t count); + + [[deprecated]] + inline int64_t write(void const* buf, int64_t count) { + rwresult res = write2(buf, static_cast<size_t>(count)); + return res ? res.value_ : -1; + } /** \brief Ensure data is flushed to disk * @@ -200,7 +212,17 @@ * * \return true iff the file has been removed or did not exist to begin with. */ -bool FZ_PUBLIC_SYMBOL remove_file(native_string const& name); + +/** \brief remove the specified file. + * + * \param missing_file_is_error If false, trying to remove a non-existing file is treated as success. + */ +result FZ_PUBLIC_SYMBOL remove_file(native_string const& name, bool missing_file_is_error); + +/// \private +[[deprecated]] inline bool remove_file(native_string const& name) { + return bool(remove_file(name, false)); +} inline file::creation_flags operator|(file::creation_flags lhs, file::creation_flags rhs) { return static_cast<file::creation_flags>(static_cast<std::underlying_type_t<file::creation_flags>>(lhs) | static_cast<std::underlying_type_t<file::creation_flags>>(rhs)); @@ -210,5 +232,13 @@ return lhs; } +/** \brief Reads the entire source file and appends if to the buffer. + * + * If file is larger than max_size, rwresult::nospace is returned. + * + * On error, the size of the output buffer remains unchanged. + */ +rwresult FZ_PUBLIC_SYMBOL read_file(fz::file & f, buffer & out, size_t max_size); + } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/libfilezilla/fsresult.hpp new/libfilezilla-0.46.0/lib/libfilezilla/fsresult.hpp --- old/libfilezilla-0.45.0/lib/libfilezilla/fsresult.hpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/libfilezilla/fsresult.hpp 2024-02-06 17:57:47.000000000 +0100 @@ -98,10 +98,11 @@ other }; + rwresult() = default; + explicit rwresult(error e, raw_t raw) : error_(e) , raw_(raw) - , value_(-1) {} explicit rwresult(size_t value) @@ -112,11 +113,13 @@ error error_{}; - /// Undefined if error_ is none - raw_t raw_{}; + union { + /// Undefined if error_ is none + raw_t raw_; - /// Undefined if error_ is not none - size_t value_{}; + /// Undefined if error_ is not none + size_t value_{}; + }; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/libfilezilla/local_filesys.hpp new/libfilezilla-0.46.0/lib/libfilezilla/local_filesys.hpp --- old/libfilezilla-0.45.0/lib/libfilezilla/local_filesys.hpp 2022-09-13 11:39:49.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/libfilezilla/local_filesys.hpp 2024-02-06 17:57:47.000000000 +0100 @@ -169,7 +169,12 @@ * * For recursive remove, see \ref fz::recursive_remove */ -result FZ_PUBLIC_SYMBOL remove_dir(native_string const& absolute_path); +result FZ_PUBLIC_SYMBOL remove_dir(native_string const& absolute_path, bool missing_dir_is_error); + +/// \private +[[deprecated]] inline result FZ_PUBLIC_SYMBOL remove_dir(native_string const& absolute_path) { + return remove_dir(absolute_path, true); +} /** * \brief Rename/move the passed file or directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/libfilezilla/process.hpp new/libfilezilla-0.46.0/lib/libfilezilla/process.hpp --- old/libfilezilla-0.45.0/lib/libfilezilla/process.hpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/libfilezilla/process.hpp 2024-02-06 17:57:47.000000000 +0100 @@ -76,9 +76,17 @@ /// IO redirection modes. enum class io_redirection { - redirect, /// Redirect the child's stdin/out/err to pipes which will be interacted with through fz::process::read and fz::process::write - none, /// Parent and child share the same stdin/out/err - closeall /// Redirects the child's stdin/out/err to pipes closed in the parent process + /// Redirect the child's stdin/out/err to pipes which will be interacted with through fz::process::read and fz::process::write + redirect, + + /// Parent and child share the same stdin/out/err + none, + + /// Redirects the child's stdin/out/err to pipes closed in the parent process + closeall, + + /// As redirect, but passes through the parent's stderr + redirect_except_stderr }; /** \brief Start the process diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/libfilezilla/util.hpp new/libfilezilla-0.46.0/lib/libfilezilla/util.hpp --- old/libfilezilla-0.45.0/lib/libfilezilla/util.hpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/libfilezilla/util.hpp 2024-02-06 17:57:47.000000000 +0100 @@ -120,6 +120,46 @@ void FZ_PUBLIC_SYMBOL wipe_unused(std::string & s); void FZ_PUBLIC_SYMBOL wipe_unused(std::vector<uint8_t> & v); +/// Compares two integers which can be of different sizes and signeness +template<class A, class B> +constexpr bool cmp_less(A a, B b) noexcept +{ + static_assert(std::is_integral_v<A>); + static_assert(std::is_integral_v<B>); + if constexpr (std::is_signed_v<A> == std::is_signed_v<B>) { + return a < b; + } + else if constexpr (std::is_signed_v<A>) { + if (a < 0) { + return true; + } + else { + return std::make_unsigned_t<A>(a) < b; + } + } + else { + if (b < 0) { + return false; + } + else { + return a < std::make_unsigned_t<B>(b); + } + } +} + +/// Casts to a different integer type, clamping the new value to the min/max of the new type if the original value cannot be represented. +template<typename Out, typename In> +constexpr Out clamped_cast(In in) noexcept +{ + if (cmp_less(in, std::numeric_limits<Out>::min())) { + return std::numeric_limits<Out>::min(); + } + if (cmp_less(std::numeric_limits<Out>::max(), in)) { + return std::numeric_limits<Out>::max(); + } + return static_cast<Out>(in); +} + } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/local_filesys.cpp new/libfilezilla-0.46.0/lib/local_filesys.cpp --- old/libfilezilla-0.45.0/lib/local_filesys.cpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/local_filesys.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -1095,7 +1095,7 @@ return {result::ok}; } -result remove_dir(native_string const& absolute_path) +result remove_dir(native_string const& absolute_path, bool missing_dir_is_error) { if (absolute_path.empty()) { return {result::invalid}; @@ -1105,7 +1105,12 @@ DWORD const err = GetLastError(); switch (err) { case ERROR_PATH_NOT_FOUND: - return {result::nodir, err}; + if (missing_dir_is_error) { + return {result::nodir, err}; + } + else { + return {result::ok}; + } case ERROR_ACCESS_DENIED: return {result::noperm, err}; default: @@ -1120,8 +1125,14 @@ case EPERM: return {result::noperm, err}; case ENOTDIR: - case ENOENT: return {result::nodir, err}; + case ENOENT: + if (missing_dir_is_error) { + return {result::nodir, err}; + } + else { + return {result::ok}; + } default: return {result::other, err}; } @@ -1152,12 +1163,12 @@ fz::buffer buffer; while (true) { if (buffer.empty()) { - auto read = in.read(buffer.get(64 * 1024), 64 * 1024); - if (read < 0) { + auto read = in.read2(buffer.get(64 * 1024), 64 * 1024); + if (!read) { return {result::other}; } - else if (read) { - buffer.add(read); + else if (read.value_) { + buffer.add(read.value_); } else { if (buffer.empty()) { @@ -1165,12 +1176,12 @@ } } } - auto written = out.write(buffer.get(), buffer.size()); - if (written <= 0) { + auto written = out.write2(buffer.get(), buffer.size()); + if (!written) { return {result::other}; } - buffer.consume(written); + buffer.consume(written.value_); } if (!out.fsync()) { return {result::other}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/process.cpp new/libfilezilla-0.46.0/lib/process.cpp --- old/libfilezilla-0.45.0/lib/process.cpp 2023-05-26 09:44:37.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/process.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -176,12 +176,12 @@ impl(impl const&) = delete; impl& operator=(impl const&) = delete; - bool create_pipes() + bool create_pipes(bool include_stderr) { return in_.create(false, handler_ != nullptr) && out_.create(true, handler_ != nullptr) && - err_.create(true, false); + (!include_stderr || err_.create(true, false)); } void thread_entry() @@ -206,7 +206,7 @@ if (quit_) { break; } - + if (res > WAIT_OBJECT_0 && res < (WAIT_OBJECT_0 + n)) { HANDLE h = handles[res - WAIT_OBJECT_0]; if (h == ol_read_.hEvent) { @@ -262,7 +262,7 @@ bool const inherit = redirect_mode != io_redirection::none; if (inherit) { - if (!create_pipes()) { + if (!create_pipes(redirect_mode != io_redirection::redirect_except_stderr)) { return false; } } @@ -277,7 +277,7 @@ return false; } - if (redirect_mode == io_redirection::redirect) { + if (redirect_mode == io_redirection::redirect || redirect_mode == io_redirection::redirect_except_stderr) { DWORD res = ReadFile(out_.read_, read_buffer_.get(64 * 1024), 64 * 1024, nullptr, &ol_read_); DWORD err = GetLastError(); if (!res && err != ERROR_IO_PENDING) { @@ -319,7 +319,7 @@ } handles[0] = in_.read_; handles[1] = out_.write_; - handles[2] = err_.write_; + handles[2] = (redirect_mode == io_redirection::redirect_except_stderr) ? GetStdHandle(STD_ERROR_HANDLE) : err_.write_; if (!UpdateProcThreadAttribute(si.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_HANDLE_LIST, handles, sizeof(handles), nullptr, nullptr)) { DeleteProcThreadAttributeList(si.lpAttributeList); @@ -381,18 +381,6 @@ handler_->filter_events(process_event_filter); } - template<typename Out, typename In> - constexpr Out clamped_cast(In in) noexcept - { - if (cmp_less(in, std::numeric_limits<Out>::min())) { - return std::numeric_limits<Out>::min(); - } - if (cmp_less(std::numeric_limits<Out>::max(), in)) { - return std::numeric_limits<Out>::max(); - } - return static_cast<Out>(in); - } - bool kill(bool force = true, duration const& timeout = {}) { if (handler_) { @@ -446,32 +434,6 @@ return true; } - - template<class A, class B> - constexpr bool cmp_less(A a, B b) noexcept - { - static_assert(std::is_integral_v<A>); - static_assert(std::is_integral_v<B>); - if constexpr (std::is_signed_v<A> == std::is_signed_v<B>) { - return a < b; - } - else if constexpr (std::is_signed_v<A>) { - if (a < 0) { - return true; - } - else { - return std::make_unsigned_t<A>(a) < b; - } - } - else { - if (b < 0) { - return false; - } - else { - return a < std::make_unsigned_t<B>(b); - } - } - } rwresult read(void* buffer, size_t len) { @@ -718,12 +680,12 @@ impl(impl const&) = delete; impl& operator=(impl const&) = delete; - bool create_pipes() + bool create_pipes(bool include_stderr) { return in_.create() && out_.create() && - err_.create(); + (!include_stderr || err_.create()); } void thread_entry() @@ -781,7 +743,7 @@ return false; } - if (redirect_mode != io_redirection::none && !create_pipes()) { + if (redirect_mode != io_redirection::none && !create_pipes(redirect_mode != io_redirection::redirect_except_stderr)) { kill(); return false; } @@ -826,7 +788,7 @@ // at stdin/out/err as we do not want to have these re-used for other things. if (dup2(in_.read_, STDIN_FILENO) == -1 || dup2(out_.write_, STDOUT_FILENO) == -1 || - dup2(err_.write_, STDERR_FILENO) == -1) + (redirect_mode != io_redirection::redirect_except_stderr && dup2(err_.write_, STDERR_FILENO) == -1)) { _exit(-1); } @@ -1045,7 +1007,7 @@ case EAGAIN: { scoped_lock l(mutex_); - waiting_read_ = true; + waiting_write_ = true; poller_.interrupt(l); } return rwresult{rwresult::wouldblock, err}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/recursive_remove.cpp new/libfilezilla-0.46.0/lib/recursive_remove.cpp --- old/libfilezilla-0.45.0/lib/recursive_remove.cpp 2022-09-05 15:38:03.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/recursive_remove.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -103,7 +103,7 @@ } if (fs.get_file_type(path) != local_filesys::dir) { - if (!remove_file(path)) { + if (!remove_file(path, false)) { success = false; } dirsToVisit.erase(iter); @@ -141,7 +141,7 @@ // Delete all files and links in current directory enumerated before for (auto const& filename : filesToDelete) { - if (!remove_file(filename)) { + if (!remove_file(filename, false)) { success = false; } } @@ -149,7 +149,7 @@ // Delete the now empty directories for (auto const& dir : dirsToDelete) { - if (!remove_dir(dir)) { + if (!remove_dir(dir, false)) { success = false; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/socket_errors.cpp new/libfilezilla-0.46.0/lib/socket_errors.cpp --- old/libfilezilla-0.45.0/lib/socket_errors.cpp 2022-04-01 14:35:07.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/socket_errors.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -143,6 +143,15 @@ return to_native(to_native(std::string(it->second.name)) + fzT(" - ") + to_native(translate(it->second.description.c_str()))); } +#if FZ_WINDOWS + wchar_t* out{}; + if (FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast<wchar_t*>(&out), 0, nullptr) != 0 && out && *out) { + native_string ret = out; + LocalFree(out); + return ret; + } +#endif + return sprintf(fzT("%d"), error); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/tls_layer_impl.cpp new/libfilezilla-0.46.0/lib/tls_layer_impl.cpp --- old/libfilezilla-0.45.0/lib/tls_layer_impl.cpp 2023-06-28 15:00:48.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/tls_layer_impl.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -313,8 +313,8 @@ } std::string c; c.resize(cs); - auto read = cf.read(c.data(), cs); - if (read != cs) { + auto read = cf.read2(c.data(), static_cast<size_t>(cs)); + if (!read || read.value_ != static_cast<size_t>(cs)) { if (logger) { logger->log(logmsg::error, fztranslate("Could not read certificate file.")); } @@ -340,8 +340,8 @@ } std::string k; k.resize(ks); - auto read = kf.read(k.data(), ks); - if (read != ks) { + auto read = kf.read2(k.data(), static_cast<size_t>(ks)); + if (!read || read.value_ != static_cast<size_t>(ks)) { logger_.log(logmsg::error, fztranslate("Could not read key file.")); return false; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/util.cpp new/libfilezilla-0.46.0/lib/util.cpp --- old/libfilezilla-0.45.0/lib/util.cpp 2023-10-11 10:26:52.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/util.cpp 2024-02-06 17:57:47.000000000 +0100 @@ -124,7 +124,8 @@ // Check it's a character device struct stat statbuf{}; if (!fstat(f.fd(), &statbuf) && statbuf.st_mode & S_IFCHR) { - if (f.read(&ret, sizeof(ret)) == sizeof(ret)) { + rwresult r = f.read2(&ret, sizeof(ret)); + if (r && r.value_ == sizeof(ret)) { return ret; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/lib/windows/version.rc.in new/libfilezilla-0.46.0/lib/windows/version.rc.in --- old/libfilezilla-0.45.0/lib/windows/version.rc.in 2020-07-07 14:06:31.000000000 +0200 +++ new/libfilezilla-0.46.0/lib/windows/version.rc.in 2024-02-06 17:57:47.000000000 +0100 @@ -15,7 +15,7 @@ VALUE "FileDescription", "libfilezilla" VALUE "FileVersion", "@PACKAGE_VERSION_MAJOR@, @PACKAGE_VERSION_MINOR@, @PACKAGE_VERSION_MICRO@, @PACKAGE_VERSION_NANO@" VALUE "InternalName", "libfilezilla" - VALUE "LegalCopyright", "Copyright (C) 2015-2019 Tim Kosse" + VALUE "LegalCopyright", "Copyright (C) 2015-2024 Tim Kosse" VALUE "OriginalFilename", "libfilezilla.dll" VALUE "ProductName", "libfilezilla" VALUE "ProductVersion", "@PACKAGE_VERSION_MAJOR@, @PACKAGE_VERSION_MINOR@, @PACKAGE_VERSION_MICRO@, @PACKAGE_VERSION_NANO@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfilezilla-0.45.0/locales/ja_JP.po new/libfilezilla-0.46.0/locales/ja_JP.po --- old/libfilezilla-0.45.0/locales/ja_JP.po 2022-10-11 14:11:47.000000000 +0200 +++ new/libfilezilla-0.46.0/locales/ja_JP.po 2024-02-06 17:57:47.000000000 +0100 @@ -1,13 +1,13 @@ # Japanese translation for libfilezilla. -# Copyright (C) 2015-2022 Tim Kosse -# Rukoto Luther <rukotolucies at hotmail.com>, 2017-2022. +# Copyright (C) 2015-2023 Tim Kosse +# Rukoto Luther <rukotolucies at hotmail.com>, 2017-2023. # msgid "" msgstr "" -"Project-Id-Version: libfilezilla 0.39.0\n" +"Project-Id-Version: libfilezilla 0.45.0\n" "Report-Msgid-Bugs-To: https://trac.filezilla-project.org/\n" -"POT-Creation-Date: 2022-09-13 14:47+0200\n" -"PO-Revision-Date: 2022-09-07 17:30+0900\n" +"POT-Creation-Date: 2023-10-23 13:14+0200\n" +"PO-Revision-Date: 2023-10-12 12:30+0900\n" "Last-Translator: Rukoto Luther <rukotolucies at hotmail.com>\n" "Language-Team: Japanese\n" "Language: ja_JP\n" @@ -16,11 +16,11 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../lib/tls_layer_impl.cpp:1664 +#: ../lib/tls_layer_impl.cpp:1674 msgid "A certificate in the chain was signed using an insecure algorithm" msgstr "ãã§ã¼ã³ã®è¨¼ææ¸ãå®å ¨ã§ãªãã¢ã«ã´ãªãºã ã§ç½²åããã¦ãã¾ã" -#: ../lib/tls_layer_impl.cpp:1668 +#: ../lib/tls_layer_impl.cpp:1678 msgid "An issuer in the certificate chain is not a certificate authority" msgstr "è¨¼ææ¸ãã§ã¼ã³ã®çºè¡è ã¯èªè¨¼å±ã§ã¯ããã¾ãã" @@ -32,29 +32,44 @@ msgid "Bad file descriptor" msgstr "䏿£ãªãã¡ã¤ã«è¨è¿°å" -#: ../lib/tls_layer_impl.cpp:1654 +#: ../lib/tls_layer_impl.cpp:1664 msgid "Beware! Certificate has been revoked" msgstr "注æ! è¨¼ææ¸ã¯å¤±å¹ãã¦ãã¾ã" +#: ../lib/http/client.cpp:767 +msgid "" +"Broken server, it claims to have processed a request before it got fully set" +msgstr "" +"ãµã¼ãã¼ã®è¨å®ãä¸é©åã§ãå®å ¨ã«è¨å®ãããåã«ãªã¯ã¨ã¹ããå¦çããã¨ä¸»å¼µãã¦" +"ãã¾ãã" + #: ../lib/socket_errors.cpp:108 ../lib/socket_errors.cpp:117 msgid "Cannot assign requested address" msgstr "è¦æ±ãããã¢ãã¬ã¹ãå²ãå½ã¦ããã¨ãã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:313 +#: ../lib/http/client.cpp:971 +msgid "Cannot use writers without buffer pool" +msgstr "ãããã¡ã¼ ãã¼ã«ããªãã¨ã©ã¤ã¿ã¼ã¯ä½¿ç¨ã§ãã¾ãã" + +#: ../lib/tls_layer_impl.cpp:310 msgid "Certificate file too big." msgstr "è¨¼ææ¸ãã¡ã¤ã«ã大ãããã¾ãã" -#: ../lib/tls_layer_impl.cpp:1727 +#: ../lib/tls_layer_impl.cpp:1737 msgid "Certificate of connection does not match expected certificate." msgstr "æ¥ç¶ã®è¨¼ææ¸ãäºæ³ãããè¨¼ææ¸ã¨ä¸è´ãã¾ããã" -#: ../lib/tls_layer_impl.cpp:1660 +#: ../lib/tls_layer_impl.cpp:1670 msgid "Certificate signature verification failed" msgstr "è¨¼ææ¸ç½²åã®æ¤è¨¼ã«å¤±æãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1201 +#: ../lib/http/client.cpp:993 +msgid "Chunk data improperly terminated" +msgstr "ãã£ã³ã¯ ãã¼ã¿ã䏿£ã«çµäºãã¾ãã" + +#: ../lib/tls_layer_impl.cpp:1211 msgid "Client did not properly shut down TLS connection" -msgstr "ã¯ã©ã¤ã¢ã³ã㯠TLS æ¥ç¶ãé©åã«ã·ã£ãããã¦ã³ãã¾ããã§ãã" +msgstr "ã¯ã©ã¤ã¢ã³ã㯠TLS æ¥ç¶ãé©åã«ã·ã£ãããã¦ã³ãã¾ãã" #: ../lib/socket_errors.cpp:72 msgid "Connection aborted" @@ -76,54 +91,99 @@ msgid "Connection reset by peer" msgstr "ç¸æã«ãã£ã¦æ¥ç¶ããªã»ããããã¾ãã" -#: ../lib/tls_layer_impl.cpp:1861 +#: ../lib/tls_layer_impl.cpp:1874 msgid "Could not add certificate to temporary trust list" msgstr "䏿çãªä¿¡é ¼ãªã¹ãã«è¨¼ææ¸ã追å ã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1853 +#: ../lib/http/client.cpp:338 ../lib/http/client.cpp:352 +#, c-format +msgid "Could not connect to '%s'" +msgstr "ã%sãã«æ¥ç¶ã§ãã¾ãã" + +#: ../lib/jws.cpp:212 +#, c-format +msgid "" +"Could not convert private key to JWK, exporting ECC parameters failed: %s" +msgstr "" +"ç§å¯éµã JWK ã«å¤æã§ãã¾ãããECC ãã©ã¡ã¼ã¿ã¼ã®ã¨ã¯ã¹ãã¼ãã«å¤±æ: %s" + +#: ../lib/jws.cpp:176 +#, c-format +msgid "" +"Could not convert private key to JWK, exporting RSA parameters failed: %s" +msgstr "" +"ç§å¯éµã JWK ã«å¤æã§ãã¾ãããRSA ãã©ã¡ã¼ã¿ã¼ã®ã¨ã¯ã¹ãã¼ãã«å¤±æ: %s" + +#: ../lib/jws.cpp:152 +#, c-format +msgid "Could not convert private key to JWK, import failed: %s" +msgstr "ç§å¯éµã JWK ã«å¤æã§ãã¾ãããã¤ã³ãã¼ãã«å¤±æ: %s" + +#: ../lib/jws.cpp:159 +msgid "" +"Could not convert private key to JWK, only RSA and ECDSA private keys are " +"supported." +msgstr "" +"ç§å¯éµã JWK ã«å¤æã§ãã¾ãããRSA ããã³ ECDSA ç§å¯éµã®ã¿ããµãã¼ãããã¦ã" +"ã¾ãã" + +#: ../lib/jws.cpp:219 +msgid "" +"Could not convert private key to JWK, unsupported elliptic curve, only " +"SECP256R1 is supported." +msgstr "" +"ç§å¯éµã JWK ã«å¤æã§ãã¾ãããæ¥åæ²ç·ã¯ãµãã¼ãããã¦ãã¾ããããµãã¼ããã" +"ã¦ããã®ã¯ SECP256R1 ã®ã¿ã§ãã" + +#: ../lib/tls_layer_impl.cpp:1866 msgid "Could not copy certificate" msgstr "è¨¼ææ¸ãã³ãã¼ã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1347 +#: ../lib/tls_layer_impl.cpp:1357 msgid "Could not extract validity period of certificate" msgstr "è¨¼ææ¸ã®æå¹æéãæ½åºã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1414 +#: ../lib/tls_layer_impl.cpp:1424 msgid "" "Could not get distinguished name of certificate issuer, " "gnutls_x509_get_issuer_dn failed" msgstr "" "è¨¼ææ¸çºè¡è ã®èå¥åãåå¾ã§ãããgnutls_x509_get_issuer_dn ã«å¤±æãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1395 +#: ../lib/tls_layer_impl.cpp:1405 msgid "" "Could not get distinguished name of certificate subject, gnutls_x509_get_dn " "failed" msgstr "" "è¨¼ææ¸ã®ãµãã¸ã§ã¯ãã®èå¥åãåå¾ã§ãããgnutls_x509_get_dn ã«å¤±æãã¾ãã" -#: ../lib/tls_layer_impl.cpp:306 +#: ../lib/tls_layer_impl.cpp:303 msgid "Could not open certificate file." msgstr "è¨¼ææ¸ãã¡ã¤ã«ãéãã¾ããã" -#: ../lib/tls_layer_impl.cpp:336 +#: ../lib/tls_layer_impl.cpp:333 msgid "Could not open key file." msgstr "éµãã¡ã¤ã«ãéãã¾ããã" -#: ../lib/tls_layer_impl.cpp:322 +#: ../lib/tls_layer_impl.cpp:319 msgid "Could not read certificate file." msgstr "è¨¼ææ¸ãã¡ã¤ã«ãèªã¿è¾¼ãã¾ããã" -#: ../lib/tls_layer_impl.cpp:348 +#: ../lib/http/client.cpp:636 ../lib/http/client.cpp:1146 +#, c-format +msgid "Could not read from socket: %s" +msgstr "ã½ã±ããããèªã¿è¾¼ãã¾ãã: %s" + +#: ../lib/tls_layer_impl.cpp:345 msgid "Could not read key file." msgstr "éµãã¡ã¤ã«ãèªã¿è¾¼ãã¾ããã" #: ../lib/aio/writer.cpp:301 ../lib/aio/writer.cpp:349 #, c-format msgid "Could not seek to offset %d within '%s'." -msgstr "" +msgstr "ãªãã»ãã %d ãã%sãå ã§æ¤ç´¢ã§ãã¾ããã" -#: ../lib/tls_layer_impl.cpp:1635 +#: ../lib/tls_layer_impl.cpp:1645 msgid "Could not sort peer certificates" msgstr "ãã¢è¨¼ææ¸ãä¸¦ã¹æ¿ãã§ãã¾ãã" @@ -137,11 +197,25 @@ msgid "Could not truncate '%s' to offset %d." msgstr "ã%sããåãæ¨ã¦ã¦ %d ããªãã»ããã§ãã¾ããã" -#: ../lib/tls_layer_impl.cpp:1813 +#: ../lib/http/client.cpp:368 ../lib/http/client.cpp:481 +#, c-format +msgid "Could not write to socket: %s" +msgstr "ã½ã±ããã«æ¸ãè¾¼ãã¾ãã: %s" + +#: ../lib/http/client.cpp:482 +msgid "Disconnected from server" +msgstr "ãµã¼ãã¼ããåæ" + +#: ../lib/http/client.cpp:459 +#, c-format +msgid "Excess data read from '%s'" +msgstr "'%s' ããã®éå°ãªãã¼ã¿èªã¿è¾¼ã¿" + +#: ../lib/tls_layer_impl.cpp:1823 msgid "Failed to extract certificate trust path" msgstr "è¨¼ææ¸ã®ä¿¡é ¼ãã¹ã®æ½åºã«å¤±æãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1806 ../lib/tls_layer_impl.cpp:1875 +#: ../lib/tls_layer_impl.cpp:1816 ../lib/tls_layer_impl.cpp:1888 msgid "Failed to verify peer certificate" msgstr "ãã¢è¨¼ææ¸ã®æ¤è¨¼ã«å¤±æãã¾ãã" @@ -149,34 +223,54 @@ msgid "File descriptor not a socket" msgstr "ãã¡ã¤ã«è¨è¿°åã¯ã½ã±ããã§ã¯ããã¾ãã" -#: ../lib/tls_layer_impl.cpp:574 +#: ../lib/tls_layer_impl.cpp:547 #, c-format msgid "GnuTLS error %d" msgstr "GnuTLS ã¨ã©ã¼ %d" -#: ../lib/tls_layer_impl.cpp:577 +#: ../lib/tls_layer_impl.cpp:550 #, c-format msgid "GnuTLS error %d in %s" msgstr "GnuTLS ã¨ã©ã¼ %d %s å " -#: ../lib/tls_layer_impl.cpp:569 +#: ../lib/tls_layer_impl.cpp:542 #, c-format msgid "GnuTLS error %d in %s: %s" msgstr "GnuTLS ã¨ã©ã¼ %d %s å : %s" -#: ../lib/tls_layer_impl.cpp:566 +#: ../lib/tls_layer_impl.cpp:539 #, c-format msgid "GnuTLS error %d: %s" msgstr "GnuTLS ã¨ã©ã¼ %d: %s" +#: ../lib/http/client.cpp:608 ../lib/http/client.cpp:665 +msgid "HTTP connection closed prematurely" +msgstr "HTTP æ¥ç¶ãéä¸ã§éãããã¾ãã" + #: ../lib/socket_errors.cpp:75 msgid "Host is down" msgstr "ãã¹ãããã¦ã³ãã¦ãã¾ã" +#: ../lib/http/client.cpp:229 +msgid "Hostname not in UTF-8" +msgstr "ãã¹ãåã UTF-8 ã§ã¯ãªã" + +#: ../lib/http/client.cpp:695 +msgid "Internal error, bad state" +msgstr "å é¨ã¨ã©ã¼ã䏿£ãªç¶æ " + #: ../lib/socket_errors.cpp:61 msgid "Interrupted by signal" msgstr "ã·ã°ãã«ã«ãã䏿ããã¾ãã" +#: ../lib/http/client.cpp:889 +msgid "Invalid Content-Length" +msgstr "䏿£ãªã³ã³ãã³ãé·" + +#: ../lib/http/client.cpp:745 +msgid "Invalid HTTP Response" +msgstr "䏿£ãª HTTP ã¬ã¹ãã³ã¹" + #: ../lib/socket_errors.cpp:49 msgid "Invalid argument passed" msgstr "䏿£ãªå¼æ°ã渡ããã¾ãã" @@ -185,6 +279,18 @@ msgid "Invalid characters in hostname" msgstr "ãã¹ãåã«ä¸æ£ãªæå" +#: ../lib/http/client.cpp:1053 ../lib/http/client.cpp:1058 +msgid "Invalid chunk size" +msgstr "䏿£ãªãã£ã³ã¯ ãµã¤ãº" + +#: ../lib/http/client.cpp:787 +msgid "Invalid line" +msgstr "䏿£ãªè¡" + +#: ../lib/http/client.cpp:754 +msgid "Invalid response code" +msgstr "䏿£ãªã¬ã¹ãã³ã¹ ã³ã¼ã" + #: ../lib/socket_errors.cpp:82 msgid "Invalid value for ai_flags" msgstr "ai_flags ã®å¤ã䏿£ã§ã" @@ -193,10 +299,14 @@ msgid "Invalid value for hints" msgstr "ãã³ãã®å¤ã䏿£ã§ã" -#: ../lib/tls_layer_impl.cpp:341 +#: ../lib/tls_layer_impl.cpp:338 msgid "Key file too big." msgstr "éµãã¡ã¤ã«ã大ãããã¾ãã" +#: ../lib/http/client.cpp:1018 +msgid "Line length exceeded" +msgstr "è¡ã®é·ããè¶ ãã¾ãã" + #: ../lib/socket_errors.cpp:46 msgid "Local address in use" msgstr "使ç¨ä¸ã®ãã¼ã«ã« ã¢ãã¬ã¹" @@ -205,7 +315,21 @@ msgid "Local endpoint has been closed" msgstr "ãã¼ã«ã« ã¨ã³ããã¤ã³ãã¯éãããã¦ãã¾ã" -#: ../lib/tls_layer_impl.cpp:1711 ../lib/tls_layer_impl.cpp:1923 +#: ../lib/http/client.cpp:993 ../lib/http/client.cpp:1005 +#: ../lib/http/client.cpp:1011 ../lib/http/client.cpp:1018 +#: ../lib/http/client.cpp:1053 ../lib/http/client.cpp:1058 +#, c-format +msgid "Malformed chunk data: %s" +msgstr "䏿£ãªãã£ã³ã¯ ãã¼ã¿: %s" + +#: ../lib/http/client.cpp:713 ../lib/http/client.cpp:719 +#: ../lib/http/client.cpp:787 ../lib/http/client.cpp:847 +#: ../lib/http/client.cpp:889 +#, c-format +msgid "Malformed response header: %s" +msgstr "䏿£ãªã¬ã¹ãã³ã¹ ãããã¼: %s" + +#: ../lib/tls_layer_impl.cpp:1721 ../lib/tls_layer_impl.cpp:1936 msgid "Man-in-the-Middle attack detected, aborting connection." msgstr "ä¸éè æ»æãæ¤åºããããããæ¥ç¶ã䏿ããã¾ããã" @@ -249,6 +373,10 @@ msgid "Not initialized, need to call WSAStartup" msgstr "åæåããã¦ããªããããWSAStartup ãå¼ã³åºãå¿ è¦ãããã¾ã" +#: ../lib/http/client.cpp:719 ../lib/http/client.cpp:1011 +msgid "Null character in line" +msgstr "è¡å ã« NULL æåãããã¾ã" + #: ../lib/socket_errors.cpp:57 msgid "Operation already in progress" msgstr "æä½ã¯æ¢ã«é²è¡ä¸ã§ã" @@ -269,6 +397,10 @@ msgid "Out of memory" msgstr "ã¡ã¢ãªä¸è¶³" +#: ../lib/http/client.cpp:233 +msgid "Path not in UTF-8" +msgstr "ãã¹ã UTF-8 ã§ã¯ãªã" + #: ../lib/socket_errors.cpp:45 ../lib/socket_errors.cpp:54 msgid "Permission denied" msgstr "ã¢ã¯ã»ã¹æå¦" @@ -285,40 +417,44 @@ msgid "Protocol not supported on given socket type" msgstr "æå®ãããã½ã±ãã ã¿ã¤ãã¯ãããã³ã«ã§ãµãã¼ãããã¦ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:589 +#: ../lib/tls_layer_impl.cpp:591 #, c-format msgid "Received TLS alert from the client: %s (%d)" msgstr "ã¯ã©ã¤ã¢ã³ããã TLS ã¢ã©ã¼ããåä¿¡ãã¾ãã: %s (%d)" -#: ../lib/tls_layer_impl.cpp:589 +#: ../lib/tls_layer_impl.cpp:591 #, c-format msgid "Received TLS alert from the server: %s (%d)" msgstr "ãµã¼ãã¼ãã TLS ã¢ã©ã¼ããåä¿¡ãã¾ãã: %s (%d)" -#: ../lib/tls_layer_impl.cpp:1681 +#: ../lib/tls_layer_impl.cpp:1691 msgid "Received certificate chain could not be verified." msgstr "åä¿¡ããè¨¼ææ¸ãã§ã¼ã³ãæ¤è¨¼ã§ãã¾ããã" -#: ../lib/tls_layer_impl.cpp:1684 +#: ../lib/tls_layer_impl.cpp:1694 #, c-format msgid "" "Received certificate chain could not be verified. Verification status is %d." msgstr "åä¿¡ããè¨¼ææ¸ãã§ã¼ã³ãæ¤è¨¼ã§ãã¾ããã確èªã¹ãã¼ã¿ã¹ã¯ %d ã§ãã" -#: ../lib/tls_layer_impl.cpp:594 +#: ../lib/tls_layer_impl.cpp:596 #, c-format msgid "Received unknown TLS alert %d from the client" msgstr "ã¯ã©ã¤ã¢ã³ãããæªç¥ã® TLS ã¢ã©ã¼ã %d ãåä¿¡ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:594 +#: ../lib/tls_layer_impl.cpp:596 #, c-format msgid "Received unknown TLS alert %d from the server" msgstr "ãµã¼ãã¼ããæªç¥ã® TLS ã¢ã©ã¼ã %d ãåä¿¡ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1320 +#: ../lib/tls_layer_impl.cpp:1330 ../lib/tls_layer_impl.cpp:1851 msgid "Remote certificate not trusted." msgstr "ãªã¢ã¼ãè¨¼ææ¸ã¯ä¿¡ç¨ããã¦ãã¾ããã" +#: ../lib/http/client.cpp:225 +msgid "Request has no host" +msgstr "ãªã¯ã¨ã¹ãã«ãã¹ããããã¾ãã" + #: ../lib/socket_errors.cpp:97 msgid "Resolved protocol is unknown" msgstr "解決ããããããã³ã«ã¯ä¸æã§ã" @@ -327,11 +463,37 @@ msgid "Resource temporarily unavailable" msgstr "ãªã½ã¼ã¹ã䏿çã«ä½¿ç¨ã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1201 +#: ../lib/http/client.cpp:621 +msgid "Response too large" +msgstr "å¿çã大ãããã" + +#: ../lib/tls_layer_impl.cpp:1211 msgid "Server did not properly shut down TLS connection" -msgstr "ãµã¼ãã¼ã¯ TLS æ¥ç¶ãé©åã«ã·ã£ãããã¦ã³ãã¾ããã§ãã" +msgstr "ãµã¼ãã¼ã¯ TLS æ¥ç¶ãé©åã«ã·ã£ãããã¦ã³ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1638 +#: ../lib/http/client.cpp:286 +#, c-format +msgid "Server instructed client to wait %d seconds before sending next request" +msgstr "" +"ãµã¼ãã¼ã¯ã¯ã©ã¤ã¢ã³ãã«ã次ã®ãªã¯ã¨ã¹ããéä¿¡ããåã« %d ç§å¾ æ©ããããã«æ" +"示ãã¾ãã" + +#: ../lib/http/client.cpp:713 +msgid "Server not sending proper line endings" +msgstr "ãµã¼ãã¼ãé©åãªæ¹è¡æåãéä¿¡ãã¾ãã" + +#: ../lib/http/digest.cpp:251 +#, c-format +msgid "Server requested unsupported digest authentication algorithm: %s" +msgstr "" +"ãµã¼ãã¼ã«ãµãã¼ãããã¦ããªããã¤ã¸ã§ã¹ãèªè¨¼ã¢ã«ã´ãªãºã ãè¦æ±ãã¾ãã: %s" + +#: ../lib/http/digest.cpp:259 +#, c-format +msgid "Server requested unsupported quality-of-protection: %s" +msgstr "ãµã¼ãã¼ã«ãµãã¼ãããã¦ããªãä¿è·å質ãè¦æ±ãã¾ãã: %s" + +#: ../lib/tls_layer_impl.cpp:1648 msgid "" "Server sent unsorted certificate chain in violation of the TLS specifications" msgstr "ãµã¼ãã¼ã¯ TLS ã®ä»æ§ã«éåãã¦æªåé¡ã®è¨¼ææ¸ãã§ã¼ã³ãéä¿¡ãã¾ãã" @@ -344,6 +506,11 @@ msgid "Socket already connected" msgstr "ã½ã±ããã¯æ¢ã«æ¥ç¶ããã¦ãã¾ã" +#: ../lib/http/client.cpp:1184 +#, c-format +msgid "Socket error: %s" +msgstr "ã½ã±ãã ã¨ã©ã¼: %s" + #: ../lib/socket_errors.cpp:70 msgid "Socket has been shut down" msgstr "ã½ã±ãããã·ã£ãããã¦ã³ããã¾ãã" @@ -376,7 +543,7 @@ msgid "The ai_socktype member is not supported" msgstr "ai_socktype ã¡ã³ãã¼ããµãã¼ããã¦ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1676 +#: ../lib/tls_layer_impl.cpp:1686 msgid "" "The certificate requires the server to include an OCSP status in its " "response, but the OCSP status is missing." @@ -384,7 +551,7 @@ "è¨¼ææ¸ã¯ãµã¼ãã¼ã®å¿çã« OCSP ã¹ãã¼ã¿ã¹ãå«ããå¿ è¦ãããã¾ãããOCSP ã¹ãã¼" "ã¿ã¹ãè¦ã¤ããã¾ããã" -#: ../lib/tls_layer_impl.cpp:1672 +#: ../lib/tls_layer_impl.cpp:1682 msgid "The server's hostname does not match the certificate's hostname" msgstr "ãµã¼ãã¼ã®ãã¹ãåãè¨¼ææ¸ã®ãã¹ãåã¨ä¸è´ãã¾ãã" @@ -400,15 +567,36 @@ msgid "The specified network name is no longer available" msgstr "æå®ã®ãããã¯ã¼ã¯åã¯ä½¿ç¨ã§ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1699 +#: ../lib/http/client.cpp:727 ../lib/http/client.cpp:804 +msgid "Too long header line" +msgstr "ãã¾ãã«ãé·ããããã¼è¡" + +#: ../lib/http/client.cpp:810 +msgid "Too many header lines" +msgstr "ãã¾ãã«ãé·ããããã¼è¡" + +#: ../lib/http/client.cpp:451 +#, c-format +msgid "Unexpected end-of-file on '%s'" +msgstr "ã%sãã®äºæããªããã¡ã¤ã«ã®çµãã" + +#: ../lib/http/client.cpp:847 +msgid "Unknown transfer encoding" +msgstr "䏿ãªè»¢éæåã³ã¼ã" + +#: ../lib/tls_layer_impl.cpp:1709 msgid "Unsupported certificate type" msgstr "ãµãã¼ãããã¦ããªãè¨¼ææ¸ã¿ã¤ã" -#: ../lib/tls_layer_impl.cpp:1608 +#: ../lib/http/client.cpp:1005 +msgid "Wrong line endings" +msgstr "ééã£ãæ¹è¡æå" + +#: ../lib/tls_layer_impl.cpp:1618 msgid "gnutls_certificate_get_peers returned no certificates" -msgstr "gnutls_certificate_get_peers ãè¨¼ææ¸ãè¿ãã¾ããã§ãã" +msgstr "gnutls_certificate_get_peers ãè¨¼ææ¸ãè¿ãã¾ãã" -#: ../lib/tls_layer_impl.cpp:1979 ../lib/tls_layer_impl.cpp:2015 -#: ../lib/tls_layer_impl.cpp:2031 ../lib/tls_layer_impl.cpp:2047 +#: ../lib/tls_layer_impl.cpp:1992 ../lib/tls_layer_impl.cpp:2028 +#: ../lib/tls_layer_impl.cpp:2044 ../lib/tls_layer_impl.cpp:2060 msgid "unknown" msgstr "䏿"
