Nils Maier
70a80b1455
Remove request pre-authorization again
2014-07-22 21:58:30 +02:00
Nils Maier
855dfa0e2f
Authorize RPC multicalls only once.
...
Cache the auth status afterwards and just assume the token still matches
(within the same request, of course).
2014-05-20 12:53:39 +02:00
Nils Maier
82dad90ff3
Validate token using PBKDF2-HMAC-SHA1.
...
This change should make token validation more resilient to:
- timing attacks (constant time array compare)
- brute-force/dictionary attacks (PBKDF2)
Closes #220
2014-04-19 19:10:06 +02:00
Nils Maier
010131161e
Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, always
2014-04-17 18:02:42 +02:00
Tatsuhiro Tsujikawa
7f6987a4b4
Implement new RPC authorization using --rpc-secret option
2014-02-02 17:34:07 +09:00
Nils Maier
d8f44ef4f6
Convert most 0/NULL pointers to nullptr
...
Courtesy of llvm cpp11-migrate 3.3
2013-08-20 21:28:24 +02:00
Tatsuhiro Tsujikawa
7c06b903f3
Use std::unique_ptr for ValueBase object hierarchy
2013-07-11 21:09:51 +09:00
Tatsuhiro Tsujikawa
00e27e4fa4
DownloadEngine: Use std::unique_ptr for eventPoll_
2013-07-06 19:39:16 +09:00
Tatsuhiro Tsujikawa
162c138362
BtRegistry: Use std::unique_ptr for BtObject
2013-07-06 19:09:39 +09:00
Tatsuhiro Tsujikawa
68f2a33355
DownloadEngine: Use std::unique_ptr for RequestGroupMan
2013-07-06 15:56:08 +09:00
Tatsuhiro Tsujikawa
10cdc59297
Remove vbegin and vend in favor of std::begin and std::end
2013-06-24 21:46:42 +09:00
Tatsuhiro Tsujikawa
bef6236da8
DownloadContext::attrs_ now holds std::unique_ptr
...
DownloadContext::getAttribute() returns a raw pointer.
2013-06-23 00:59:55 +09:00
Tatsuhiro Tsujikawa
07d270c87e
Require -std=c++11 and use std::shared_ptr instead of SharedHandle
2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
d444a6cc9e
Make getOption RPC method return option for stopped downloads
2013-05-28 22:55:09 +09:00
Tatsuhiro Tsujikawa
4f5d26a0c7
Use BtFileMode for TorrentAttribute::mode
2013-05-15 00:09:51 +09:00
Tatsuhiro Tsujikawa
d4ba562710
Implement IndexedList::iterator
...
It is dangerous to expose internal iterator to the outside, which is
easily misused.
2013-03-03 18:00:42 +09:00
Tatsuhiro Tsujikawa
07bb779eb0
Faster deletion of RequestGroup and DownloadResult lists
2012-12-19 23:03:48 +09:00
Tatsuhiro Tsujikawa
b9da9d4ed3
Use 64 bits random bytes as GID
...
This change replaces the current 64 bit sequential GID with 64 bits
random bytes GID in an attempt to support persistent GID. Internally,
the GID is stored as uint64_t. For human representation and RPC
interface, GID is represented as 16 bytes hex string. For console
readout, 16 bytes are too long, so it is abbreviated to first 6 bytes.
When querying GID in RPC calls, user can speicfy the prefix of GID as
long as the prefix is shared by more than 1 GID entries.
2012-12-16 17:29:01 +09:00
Tatsuhiro Tsujikawa
a9c76ed35e
Added --rpc-save-upload-metadata option
...
If true is given, which is default, save the uploaded torrent or
metalink metadata in the directory specified by --dir option. The
filename consists of SHA1-hash hex string of metadata plus
extension. For torrent, the extension is '.torrent'. For metalink, it
is '.meta4'. If false is given to this option, the downloads added by
aria2.addTorrent or aria2.addMetalink will not be saved by
--save-session option.
2012-10-16 00:18:34 +09:00
Tatsuhiro Tsujikawa
8b0c701266
Removed trailing spaces
2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa
9d294741fd
Rewritten FeatureConfig into set of functions
2012-09-22 20:56:39 +09:00
Tatsuhiro Tsujikawa
68eb1b6737
Ignore unacceptable options in RPC request instead of throwing error.
...
This change allows RPC client to send same options for the different
type of downloads.
2012-05-17 22:52:39 +09:00
Tatsuhiro Tsujikawa
f4e0eae904
Added checkRequiredInteger() to check integer param is in valid range.
...
Ensure that fileIndex in aria2.changeUri RPC method is greater than or
equal to 1.
2012-02-26 21:49:37 +09:00
Tatsuhiro Tsujikawa
ad11d746f0
Only accepts 32 bit integer values from int and i4 elements in XML-RPC.
...
Fixed overflow in AbstractPaginationRpcMethod::getPaginationRange().
Fixes bug#3494165
2012-02-26 19:45:25 +09:00
Tatsuhiro Tsujikawa
f0bcfa822e
Use int instead of unsigned int where unsigned int is not needed.
2011-12-09 21:39:43 +09:00
Tatsuhiro Tsujikawa
9a51cc356b
Changed interface of BtRegistry.
...
BtRegistry now uses SharedHandle<BtObject> instead of BtObject.
2011-11-01 23:13:13 +09:00
Tatsuhiro Tsujikawa
12659c74a8
Don't copy Option in RequestGroup ctor.
...
Copy on receive is not a practice in aria2 source code.
2011-10-25 21:44:04 +09:00
Tatsuhiro Tsujikawa
62a07fff5f
Fixed unit test
2011-10-25 00:05:28 +09:00
Tatsuhiro Tsujikawa
3832ed97c6
Rewritten Option. Introduced Pref.
...
Now preference key is Pref instead of just string. It has Option
ID. Now option lookup and setting takes O(1) using Pref object.
2011-10-21 21:56:42 +09:00
Tatsuhiro Tsujikawa
7e7aeac3ff
Added --piece-length option.
...
This option sets a piece length for HTTP/FTP downloads. This is the
boundary when aria2 splits a file. All splits occur at multiple of
this length. This option will be ignored in BitTorrent downloads. It
will be also ignored if Metalink file contains piece hashes.
2011-09-27 21:48:41 +09:00
Tatsuhiro Tsujikawa
05104ba177
Removed asString, asList, ... and use downcast<T> instead.
2011-09-26 21:45:45 +09:00
Tatsuhiro Tsujikawa
d1885a5874
Allowed missing params in system.multicall RPC method.
2011-06-15 00:42:50 +09:00
Tatsuhiro Tsujikawa
46eced8ada
Fixed compile error and unit test error without SSL library.
2011-03-17 16:08:39 +09:00
Tatsuhiro Tsujikawa
6e818a06dc
Replaced gid_t with a2_gid_t cause gid_t is commonly used as group ID.
2011-03-17 12:17:46 +09:00
Tatsuhiro Tsujikawa
73572712d8
Use .meta4 instead of .metalink as suffix when saving metalink XML
...
uploaded by RPC.
2011-03-16 16:55:38 +09:00
Tatsuhiro Tsujikawa
f0cfbb21c1
Renamed classes in abstract layer of RPC service from XmlRpc* to Rpc*.
...
Now JSON-RPC is available by default regardless of XML library.
XML-RPC becomes available when XML library is available.
2011-03-14 16:38:54 +09:00