Commit Graph

13480 Commits

Author SHA1 Message Date
Pavel Shlyak 2ef07517b6 Cleanup duplicates in clients.c (#991) 2019-10-21 08:20:40 -05:00
C.W. Betts 33b792531d Use -[[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] in one other place. 2019-07-28 16:13:57 -06:00
C.W. Betts 751200f59a Update PrefsController:
Use [[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] instead of using NSString's creation.
2019-07-21 15:04:09 -06:00
Mike Gelfand 5a5fe7d7fe Bump version to 3.00 (nightly) 2019-07-21 15:11:49 +03:00
Mingye Wang bcf8128400 Unify/Modernize TOS to DSCP standards (#737)
* Unify/Modernize TOS to DSCP standards

The set of pre-named TOS values are now renamed to the latest DSCP
standards, with traffic classes and everything exciting. To keep
everything in the same place, a segment has been added to net.h to keep
the currently named values.

A result of these changes is that "lowcost" is probably no longer
harmless, as it now encourages the router to preferentially drop the
packages when bandwidth requires so. "lowdelay" is assigned to a pretty
high AF class for SIP and stuff. I am not sure at all about the
"throughput" assignment. I mean, the whole point of DSCP-fication is
translating from the old ToS bits to a more precedence-based notation,
and precedence is supposed to lie beside the old 4 ToS bits...

A funny interaction between the AFxy and the old ToS fields lies in
the old "reliability" (0x08) field. All odd numbers of y (1, 3 : low,
high) switches it on. If you spend 5 more minutes on it you can probably
come up with "pun" values that hold similar meanings in DSCP and
Prec/ToS.

By removing the IPv6 override, I should have kind of satisfied the #692
request.

Fixes: #692
2019-07-21 14:09:04 +03:00
C.W. Betts cabffe76eb Replace -[[NSURL path] fileSystemRepresentation] with just -[NSURL fileSystemRepresentation].
We're targeting a late-enough version of OS X that has that API.
2019-07-20 14:00:19 -06:00
C.W. Betts f1616c5065 Replace some instances of -UTF8String with -fileSystemRepresentation. 2019-07-20 13:40:33 -06:00
C.W. Betts 0a67db48bc Merge branch 'master' into patch-1 2019-07-15 12:24:32 -06:00
Mike Gelfand eef4799388 Update Uncrustify config to 0.69 2019-07-15 02:30:41 +03:00
Mike Gelfand 35ed02a1fd Use explicit boolean conversions (follow-up) 2019-07-14 22:57:40 +03:00
Mike Gelfand 10cdd7f790 Use explicit boolean conversions 2019-07-14 16:25:07 +03:00
Mike Gelfand 16d385e4c7 Fixup code style 2019-07-13 23:02:27 +03:00
Mike Gelfand ec79767e5f Support OFD locks and missing flock 2019-07-13 22:53:04 +03:00
Mike Gelfand a3e4919385 Introduce `tr_str_is_empty` to relay intent better 2019-07-13 12:00:06 +03:00
Mike Gelfand bff188c2cf Fully cover `tr_metainfo_sanitize_path_component` 2019-06-24 06:32:38 +03:00
Mike Gelfand 99033b067d Sanitize suspicious path components instead of rejecting them
Apply the same rules on all the supported platforms to avoid issues
with network shares and alien file systems.

For future compatibility, explicitly mark adjusted paths as renamed.

Fixes: #294
2019-06-23 18:08:31 +03:00
Mike Gelfand 139f3a3f4b Add missing declaration for `tr_strcasestr` 2019-06-23 12:07:33 +03:00
Mike Gelfand f3968b7708 Load CA certs from system store on Windows / OpenSSL
Fixes: #446
2019-06-23 11:59:53 +03:00
Mike Gelfand 3538eb93c3 Update curl and openssl to those in 10.10 SDK (macOS) 2019-06-22 16:43:59 +03:00
Mike Gelfand c369f36867 Only add revision to filename for nightly builds (MSI package) 2019-06-20 04:55:30 +03:00
Mike Gelfand fc5857f0d8 Include Windows Vista Qt style, remove dbus revision suffix and expat (MSI package) 2019-06-20 04:55:30 +03:00
Mike Gelfand 1f756114a5 Support OpenSSL 1.1 x64 file names (MSI package) 2019-06-18 22:50:03 +03:00
Mike Gelfand af3d4639e2 Support OpenSSL 1.1 file names (MSI package) 2019-06-18 08:21:01 +03:00
Mike Gelfand a82c26642c Support MSVS 2017 VC CRT MSM file locations (MSI package) 2019-06-18 08:10:30 +03:00
C.W. Betts 77016edadd Xcode: Update/fix framework references. 2019-06-15 12:19:34 -06:00
C.W. Betts 2d4a53f2df Xcode: Fix development region. 2019-06-15 12:12:55 -06:00
C.W. Betts 3b1780982a Xcode: Add encoding info to strings files. 2019-06-15 09:37:14 -06:00
C.W. Betts 04c6885232 Xcode: Fix localization paths. 2019-06-15 09:23:17 -06:00
C.W. Betts 8911c9a839 Fix Xcode groups:
Make them actually point to the folders.
2019-06-15 09:15:10 -06:00
Mitch Livingston cff5a68814
Merge branch 'master' into dock_string_crash_fix 2019-04-27 21:43:10 -04:00
Mike Gelfand 3d9fd25269 Fixup invalid daemon foreground mode check (2cc996cb77) 2019-04-22 07:20:46 +03:00
Dmitry Serov 4d071deead Log attempts to open non-URL strings 2019-04-19 15:41:02 +07:00
Dmitry Serov 4331d9f0c7 Ignore non-URL strings when opening URLs 2019-04-19 02:28:45 +07:00
LaserEyess 750589101a Parse session-id header case-insensitively (#765)
RFC 2616 defines headers as case-insensitive, so if rpc is behind a
reverse proxy that lowers the case of headers, transmission will not
parse them correctly.

A new wrapper function, `tr_strcasestr` is added to
libtransmission/utils.c to allow for comparisons of headers case
insensitively, and checks in cmake and autogen are included.
2019-03-17 17:37:52 +03:00
Mike Gelfand e736604fc3 Mark a couple of MSI properties as secure
They are being discarded by server side with "ignoring disallowed
property" messages otherwise which leads to failed checks using those
properties.

Fixes: #451
2019-03-17 17:33:58 +03:00
Mike Gelfand c567588587 Remove useless parentheses 2019-03-17 09:18:27 +03:00
Mike Gelfand 5693e59256 Define each identifier in a dedicated statement
* MISRA C++:2008, 8-0-1 - An init-declarator-list or a member-declarator-list
  shall consist of a single init-declarator or member-declarator respectively
* CERT, DCL52-J. - Do not declare more than one variable per declaration
* CERT, DCL04-C. - Do not declare more than one variable per declaration
2019-03-17 09:15:35 +03:00
Mike Gelfand 97a0fed734 Remove side effects from right hand operands of && or ||
* MISRA C:2004, 12.4 - The right-hand operand of a logical && or || operator
  shall not contain side effects.
* MISRA C++:2008, 5-14-1 - The right hand operand of a logical && or ||
  operator shall not contain side effects.
* MISRA C:2012, 13.5 - The right hand operand of a logical && or || operator
  shall not contain persistent side effects
* CERT, EXP02-C. - Be aware of the short-circuit behavior of the logical AND
  and OR operators
2019-03-17 09:09:08 +03:00
Mike Gelfand 17307e7484 Extract assignments from expression
Assignments explicitly enclosed in parentheses are ignored.

* MISRA C:2004, 13.1 - Assignment operators shall not be used in expressions
  that yield a Boolean value
* MISRA C++:2008, 6-2-1 - Assignment operators shall not be used in
  sub-expressions
* MISRA C:2012, 13.4 - The result of an assignment operator should not be used
* MITRE, CWE-481 - Assigning instead of Comparing
* CERT, EXP45-C. - Do not perform assignments in selection statements
* CERT, EXP51-J. - Do not perform assignments in conditional expressions
2019-03-17 08:00:15 +03:00
Mike Gelfand d3b8982195 Uppercase the literal suffixes
* MISRA C++:2008, 2-13-4 - Literal suffixes shall be upper case
* MISRA C:2012, 7.3 - The lowercase character "l" shall not be used in a
  literal suffix
* CERT DCL16-C. - Use "L," not "l," to indicate a long value
* CERT, DCL50-J. - Use visually distinct identifiers
2019-03-17 07:07:48 +03:00
Mitch Livingston a2c42268dc
Merge pull request #859 from fishead/fix-typo
fix typo
2019-03-16 12:51:32 -04:00
Chuan Zhang 84f3ba606a
typo 2019-03-16 22:36:18 +08:00
Mike Gelfand 2cc996cb77 Refactor daemon startup a bit
Fix exit code to be zero when dumping settings along the way.

Closes: #487
2019-03-15 21:55:45 +03:00
Mike Gelfand f3951faf3d Actually add new languages to the build 2019-03-13 23:35:16 +03:00
Mike Gelfand 698bb2c418 Attempt to explain something to Coverity
I'm seeing 7 potentially false reported issues re. use of uninitialized buffer
data here. It seems that `read` function should be properly supported by
Coverity, but maybe it can't figure out the postconditions of it properly...
Walking in the dark here.
2019-03-13 05:32:35 +03:00
Mike Gelfand 10b0a280b1 Let compiler calculate static quark lenghts for us 2019-03-13 00:01:17 +03:00
Mike Gelfand 1442f8fded Fix build break from previous commit on old Clangs
Remove static assert altogether: it should have worked everywhere anyway,
otherwise there is no point.

Add a few casts here and there to ensure proper type for directory handle.
2019-03-10 19:52:27 +03:00
Mike Gelfand 36110e18c4 Fix build on E2K with LCC (patch by Michael Shigorin, ALT Linux) 2019-03-10 19:35:10 +03:00
Mike Gelfand 95dd630ed4 Add new translations from Transifex (95% and higher)
GTK client: Portuguese (Portugal).

Qt client: Afrikaans, Catalan, Danish, Greek, Norwegian Bokmål, Slovenian.

Mac client: none (there're suitable languages, but they're lacking XIB files
and we haven't switched to base localization yet).
2019-03-06 03:14:15 +03:00
Mike Gelfand 3debbc7cb8 Sync existing translations with Transifex 2019-03-06 03:12:51 +03:00