http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/roundup/xmlrpc.py Mercurial Repository: p/roundup/code: roundup/xmlrpc.py history 2024-10-21T18:12:03+02:00 [permission-performance] Move permission check code to hyperdb http://hg.code.sf.net:8000/p/roundup/code/#changeset-f7bd22bdef9d261dfa23b72c9146319e15e6514c Ralf Schlatterbeck rsc@runtux.com 2024-10-21T18:12:03+02:00 2024-10-21T18:12:03+02:00
changeset f7bd22bdef9d
branch permission-performance
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Move permission check code to hyperdb

Now the hyperdb has a method filter_with_permissions that performs the
permission checks before (for filtering on sort/group/filterspec
arguments) and after a call to hyperdb.filter.

This also fixes possible problems on the unfiltered
sort/group/filterspec arguments in roundup/rest.py and
roundup/cgi/templating.py
files
flake8 changes; move imports before first statements; whitespace http://hg.code.sf.net:8000/p/roundup/code/#changeset-af1067e0f6d90dd1c1e515a3bc39aad173959b93 John Rouillard rouilj@ieee.org 2019-12-31T21:56:14-05:00 2019-12-31T21:56:14-05:00
changeset af1067e0f6d9
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 changes; move imports before first statements; whitespace

normalization.
files
[REST-rebased] Fix actions http://hg.code.sf.net:8000/p/roundup/code/#changeset-ed02a1e0aa5d70f635f3f0438f84e98fc0864a79 Ralf Schlatterbeck rsc@runtux.com 2019-01-30T14:12:27+01:00 2019-01-30T14:12:27+01:00
changeset ed02a1e0aa5d
branch REST-rebased
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Fix actions

Permission for retire in roundup/actions.py was with 'Edit' permission,
not 'Retire' permission. Add a 'restore' action to roundup/actions.py.
Both are now correctly used in rest.py and xmlrpc.py (the latter had
some errors when printint error messages).

Also reworked the rest implementation: Despite the warnings in the
roundup API in hyperdb.py the DELETE http method would *destroy* and not
*retire* an item. This has been fixed. We also do not allow retire of a
complete class (although this was implemented) because this seems to
dangerous and we see no use-case.
files
make sure everything is sorted in the xmlrpc schema http://hg.code.sf.net:8000/p/roundup/code/#changeset-7f3dfdd6a620aa1a154d766d4df2cd0668079f1a Christof Meerwald cmeerw@cmeerw.org 2018-08-16T20:34:42+01:00 2018-08-16T20:34:42+01:00
changeset 7f3dfdd6a620
branch
bookmark
tag
user Christof Meerwald <cmeerw@cmeerw.org>
description make sure everything is sorted in the xmlrpc schema
files
Python 3 preparation: unicode. http://hg.code.sf.net:8000/p/roundup/code/#changeset-56c9bcdea47f22412e4f0768775d1abea52d19c2 Joseph Myers jsm@polyomino.org.uk 2018-07-25T09:05:58+00:00 2018-07-25T09:05:58+00:00
changeset 56c9bcdea47f
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: unicode.

This patch introduces roundup/anypy/strings.py, which has a comment
explaining the string representations generally used and common
functions to handle the required conversions. Places in the code that
explicitly reference the "unicode" type / built-in function are
generally changed to use the new functions (or, in a few places where
those new functions don't seem to fit well, other approaches such as
references to type(u'') or use of the codecs module). This patch does
not generally attempt to address text conversions in any places not
currently referencing the "unicode" type (although
scripts/import_sf.py is made to use binary I/O in places as fixing the
"unicode" reference didn't seem coherent otherwise).
files
Python 3 preparation: update xmlrpclib / SimpleXMLRPCServer imports. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e46ce04d5bbcecc7b7dfc3f057118a8f7e33576c Joseph Myers jsm@polyomino.org.uk 2018-07-25T00:16:00+00:00 2018-07-25T00:16:00+00:00
changeset e46ce04d5bbc
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: update xmlrpclib / SimpleXMLRPCServer imports.

New roundup/anypy/xmlrpc_.py added. Manual patch.
files
Python 3 preparation: update calls to dict methods. http://hg.code.sf.net:8000/p/roundup/code/#changeset-23b8e6067f7cdf5ff451f0a99cac4fb288e56859 Joseph Myers jsm@polyomino.org.uk 2018-07-24T23:04:42+00:00 2018-07-24T23:04:42+00:00
changeset 23b8e6067f7c
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: update calls to dict methods.

Tool-assisted patch. Changes of iterkeys / itervalues / iteritems to
keys / values / items are fully automated, but may make things less
efficient in Python 2. Automated tools want to add list() around many
calls to keys / values / items, but I thought most such list()
additions were unnecessary because it seemed the result of keys /
values / items was just iterated over while the set of dict keys
remained unchanged, rather than used in a way requiring an actual
list, or used while the set of keys in the dict could change. It's
quite possible I missed some cases where list() was really needed, or
left in some unnecessary list() calls.

In cases where list() was only needed because the resulting list was
then sorted in-place, I changed the code to use calls to sorted().
files
Python 3 preparation: change "x.has_key(y)" to "y in x". http://hg.code.sf.net:8000/p/roundup/code/#changeset-0942fe89e82e3e84d95a3d0ca5d8d15502f57348 Joseph Myers jsm@polyomino.org.uk 2018-07-24T22:08:17+00:00 2018-07-24T22:08:17+00:00
changeset 0942fe89e82e
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: change "x.has_key(y)" to "y in x".

(Also likewise "not in" where appropriate.) Tool-generated patch.
files
Python 3 preparation: "raise" syntax. http://hg.code.sf.net:8000/p/roundup/code/#changeset-35ea9b1efc1494f29fb07690e7087686de58e0f3 Joseph Myers jsm@polyomino.org.uk 2018-07-24T21:39:58+00:00 2018-07-24T21:39:58+00:00
changeset 35ea9b1efc14
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: "raise" syntax.

Changing "raise Exception, value" to "raise Exception(value)".
Tool-assisted patch. Particular cases to check carefully are the one
place in frontends/ZRoundup/ZRoundup.py where a string exception
needed to be fixed, and the one in roundup/cgi/client.py involving
raising an exception with a traceback (requires three-argument form of
raise in Python 2, which as I understand it requires exec() to avoid a
Python 3 syntax error).
files
xmlrpc: logging; content property http://hg.code.sf.net:8000/p/roundup/code/#changeset-db8659c4e8eba6eb531f3a627c24c9b71b9a3795 Ralf Schlatterbeck rsc@runtux.com 2018-05-29T13:36:22+02:00 2018-05-29T13:36:22+02:00
changeset db8659c4e8eb
branch
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description xmlrpc: logging; content property

The 'content' property is special: It should not be set to None when
receiving an empty string (creation of an empty file) but to an empty
string instead. Otherwise we'll get a traceback from the backend.
files
Use Python-3-compatible 'as' syntax for except statements http://hg.code.sf.net:8000/p/roundup/code/#changeset-198b6e810c67c4e7e38f1aa41edbc864783fe6e6 Eric S. Raymond esr@thyrsus.com 2017-08-24T22:21:37-04:00 2017-08-24T22:21:37-04:00
changeset 198b6e810c67
branch
bookmark
tag
user Eric S. Raymond <esr@thyrsus.com>
description Use Python-3-compatible 'as' syntax for except statements

Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
files
Remove 'import *' statement from xmlrpc.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-1c792cf0a57434d343520fde77e15158f8f02fa7 John Kristensen john@jerrykan.com 2016-06-10T17:08:37+10:00 2016-06-10T17:08:37+10:00
changeset 1c792cf0a574
branch
bookmark
tag
user John Kristensen <john@jerrykan.com>
description Remove 'import *' statement from xmlrpc.py

There are various 'import *' statements scattered through the code which
are generally not a good thing. These should be fairly safe changes, but
I'll commit them one file at a time to make it easier to track down
issues with a bisect if they crop up later.
files
Simplify SimpleXMLRPCDispatcher initialisation http://hg.code.sf.net:8000/p/roundup/code/#changeset-6b7f257e5de8889a4db58463eb93de2befb9694d John Kristensen john@jerrykan.com 2015-08-13T14:45:53+10:00 2015-08-13T14:45:53+10:00
changeset 6b7f257e5de8
branch
bookmark
tag
user John Kristensen <john@jerrykan.com>
description Simplify SimpleXMLRPCDispatcher initialisation

Support for Python v2.4 has been dropped a while ago so we can remove
the compatibility support for initialising SimpleXMLRPCDispatcher with
version of Python older than v2.5
files
Implement XMLRPC MultiCall (including test), see http://hg.code.sf.net:8000/p/roundup/code/#changeset-d9e5539303bd0e00041dd3b1ac126e7195838311 Ralf Schlatterbeck rsc@runtux.com 2013-06-17T16:53:34+02:00 2013-06-17T16:53:34+02:00
changeset d9e5539303bd
branch
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Implement XMLRPC MultiCall (including test), see
http://docs.python.org/2/library/xmlrpclib.html#xmlrpclib.MultiCall
files
Fix xmlrpc permissions for lookup method. http://hg.code.sf.net:8000/p/roundup/code/#changeset-c9b85ca1f9858ee35eb702fde4166e0fc71e7bea Ralf Schlatterbeck rsc@runtux.com 2012-10-17T15:32:41+02:00 2012-10-17T15:32:41+02:00
changeset c9b85ca1f985
branch
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Fix xmlrpc permissions for lookup method.

Allow if the key attribute is either searchable or viewable, don't check
id attribute.
files
Add "lookup" method to xmlrpc interface (Ralf Schlatterbeck) http://hg.code.sf.net:8000/p/roundup/code/#changeset-3f251efd5f48744e446f70e2887889e7dce599fd Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2010-10-29T10:41:39+00:00 2010-10-29T10:41:39+00:00
changeset 3f251efd5f48
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description Add "lookup" method to xmlrpc interface (Ralf Schlatterbeck)
files
- Add explicit "Search" permissions, see Security Fix below. http://hg.code.sf.net:8000/p/roundup/code/#changeset-261c9f913ff78c2f2c0b2beacef42f761b6c2488 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2010-10-19T15:29:05+00:00 2010-10-19T15:29:05+00:00
changeset 261c9f913ff7
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description - Add explicit "Search" permissions, see Security Fix below.

- Security Fix: Add a check for search-permissions: now we allow
searching for properties only if the property is readable without a
check method or if an explicit search permission (see above unter
"Features) is given for the property. This fixes cases where a user
doesn't have access to a property but can deduce the content by
crafting a clever search, group or sort query.
see doc/upgrading.txt for how to fix your trackers!
files
- fix coding style from yesterday http://hg.code.sf.net:8000/p/roundup/code/#changeset-40d7414592ac82ac8278c35795c84bbe5b5266bd Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2010-04-09T09:49:06+00:00 2010-04-09T09:49:06+00:00
changeset 40d7414592ac
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description - fix coding style from yesterday

- Allow encoding of parameters as "Binary" (this is encoded as base64 in
xmlrpc). Example:
s.create("file", "name=bla", "type=application/octet-stream",
xmlrpclib.Binary("content=\0"))
files
xmlrpc handling of unicode characters, see http://hg.code.sf.net:8000/p/roundup/code/#changeset-2188c9de5bddd2a9af7fd2aa1894915d30c69243 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2010-04-08T14:33:54+00:00 2010-04-08T14:33:54+00:00
changeset 2188c9de5bdd
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description xmlrpc handling of unicode characters, see
http://thread.gmane.org/gmane.comp.bug-tracking.roundup.user/10040
files
- fix create permission for xmlrpc, too http://hg.code.sf.net:8000/p/roundup/code/#changeset-7291130fad82ff50a339404d59a2774e183b0b7a Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2009-12-21T21:03:24+00:00 2009-12-21T21:03:24+00:00
changeset 7291130fad82
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description - fix create permission for xmlrpc, too
files
Small fix for CGI-handling of XMLRPC requests for python2.4... http://hg.code.sf.net:8000/p/roundup/code/#changeset-712549bb7fe59545913ec32752c3f3ffc026a87d Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2009-10-02T14:29:12+00:00 2009-10-02T14:29:12+00:00
changeset 712549bb7fe5
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description Small fix for CGI-handling of XMLRPC requests for python2.4...

...this worked only for 2.5 and beyond due to a change in the xmlrpc
interface in python
files
[gsoc-2009] Some preparations for 3.0 migration http://hg.code.sf.net:8000/p/roundup/code/#changeset-4498f5252f8b7dd56af5400a063a5c20419380bc Pygi pygi@users.sourceforge.net 2009-07-24T04:35:05+00:00 2009-07-24T04:35:05+00:00
changeset 4498f5252f8b
branch gsoc-2009
bookmark
tag
user Pygi <pygi@users.sourceforge.net>
description Some preparations for 3.0 migration
files
Move db.commit() call from handle_xmlrpc() to individual methods... http://hg.code.sf.net:8000/p/roundup/code/#changeset-3f6cadb98c2f9097945bb95ba11c7bb8b32f3af6 Stefan Seefeld stefan@seefeld.name 2009-07-19T22:56:30+00:00 2009-07-19T22:56:30+00:00
changeset 3f6cadb98c2f
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Move db.commit() call from handle_xmlrpc() to individual methods...

...so actions can control it themselves.
files
Allow XMLRPC clients to fetch tracker schema. http://hg.code.sf.net:8000/p/roundup/code/#changeset-3c4545f5594948617af441b3c6be43f0a9f7b190 Stefan Seefeld stefan@seefeld.name 2009-06-19T17:10:07+00:00 2009-06-19T17:10:07+00:00
changeset 3c4545f55949
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Allow XMLRPC clients to fetch tracker schema.
files
Restrict user creation rights in XMLRPC frontend. http://hg.code.sf.net:8000/p/roundup/code/#changeset-0ad79301f055d2fa462f7021a88c3940d1493aed Stefan Seefeld stefan@seefeld.name 2009-06-17T01:26:04+00:00 2009-06-17T01:26:04+00:00
changeset 0ad79301f055
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Restrict user creation rights in XMLRPC frontend.
files
XMLRPC improvements: http://hg.code.sf.net:8000/p/roundup/code/#changeset-bbab97f8ffb2f6e94262615a068f7878d9e572c0 Stefan Seefeld stefan@seefeld.name 2009-02-27T17:46:47+00:00 2009-02-27T17:46:47+00:00
changeset bbab97f8ffb2
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description XMLRPC improvements:

* Add support for actions to XMLRPC interface.
* Provide bridge so user actions may be executed
either via CGI or XMLRPC.
* Adjust XMLRPC tests to recent work.
* Cleanup.
files
* Refactor XMLRPC interface. http://hg.code.sf.net:8000/p/roundup/code/#changeset-edf526c9141291a6ae203226678afbf35f56f1cb Stefan Seefeld stefan@seefeld.name 2009-02-25T18:17:39+00:00 2009-02-25T18:17:39+00:00
changeset edf526c91412
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description * Refactor XMLRPC interface.
* Make it accessible through web-server.
files
Add filter() to XML-RPC interface [SF#966456] http://hg.code.sf.net:8000/p/roundup/code/#changeset-f7f3068b32a18d42d61f24e8f2b0aeeb35504956 Richard Jones richard@users.sourceforge.net 2008-08-07T06:21:07+00:00 2008-08-07T06:21:07+00:00
changeset f7f3068b32a1
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description Add filter() to XML-RPC interface [SF#966456]
files
xml-rpc security checks and tests across all backends [SF#1907211] http://hg.code.sf.net:8000/p/roundup/code/#changeset-85cbaa50eba1b9c18325331f959459581aa344ba Richard Jones richard@users.sourceforge.net 2008-03-07T01:11:55+00:00 2008-03-07T01:11:55+00:00
changeset 85cbaa50eba1
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description xml-rpc security checks and tests across all backends [SF#1907211]

also add some leap year tests
files
Add security checks and tests for xmlrpc interface. http://hg.code.sf.net:8000/p/roundup/code/#changeset-3c3077582c1696a7546490d1d9c98dbbee2e0009 Richard Jones richard@users.sourceforge.net 2007-11-03T00:50:38+00:00 2007-11-03T00:50:38+00:00
changeset 3c3077582c16
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description Add security checks and tests for xmlrpc interface.
files
fix RoundupRequest: http://hg.code.sf.net:8000/p/roundup/code/#changeset-c31da624ae3b92b9d0f90412b2f81a1bcf88d588 Alexander Smishlajev a1s@users.sourceforge.net 2007-04-04T07:51:43+00:00 2007-04-04T07:51:43+00:00
changeset c31da624ae3b
branch
bookmark
tag
user Alexander Smishlajev <a1s@users.sourceforge.net>
description fix RoundupRequest:

the database must not be left open when an error is raised from the
constructor
files
fix compatibility with Python2.3: http://hg.code.sf.net:8000/p/roundup/code/#changeset-9596a516d78cce7887cc28042aa525cdfaf2f02c Alexander Smishlajev a1s@users.sourceforge.net 2007-04-04T05:11:23+00:00 2007-04-04T05:11:23+00:00
changeset 9596a516d78c
branch
bookmark
tag
user Alexander Smishlajev <a1s@users.sourceforge.net>
description fix compatibility with Python2.3:

try/except/finally statement first appeared in Python2.5;

add vim modeline
files
Varia http://hg.code.sf.net:8000/p/roundup/code/#changeset-cf6c45201980db1a90cb86c4d2f9f1becd06800b Stefan Seefeld stefan@seefeld.name 2007-04-03T16:52:51+00:00 2007-04-03T16:52:51+00:00
changeset cf6c45201980
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Varia
files
Initial checkin for new xmlrpc frontend. http://hg.code.sf.net:8000/p/roundup/code/#changeset-ba6ba8d6bcc1fec38e3d3bd7c9784b03563c26e2 Stefan Seefeld stefan@seefeld.name 2007-03-22T02:07:44+00:00 2007-03-22T02:07:44+00:00
changeset ba6ba8d6bcc1
branch
bookmark
tag
user Stefan Seefeld <stefan@seefeld.name>
description Initial checkin for new xmlrpc frontend.
files