Source

trac-ticketlinks / trac / tests / attachment.py

Author Commit Message Labels Comments Date
jomae
0.12.3dev: Fixed directory traversal attack in reparenting attachments.
Branches
0.12-stable
osimons
Fix tests for attachment resource existence added in [9724].
Branches
trunk
cboos
Implement `AttachmentModule.resource_exists`. This checks both for the existence of the attachment in the database and on the file system.
Branches
trunk
rblank
wiki: Added functionality to rename a wiki page. Thanks to Jan Schukat for reviving the branch, updating it to trunk and adding tests. Part of #1106.
Branches
trunk
rblank
0.12dev: Autumn cleaning using pylint: * Removed unused imports. * Removed unused locals. * Fixed whitespace issues (indentation, spacing, coding conventions). * Removed semicolons at the end of lines (some people around here have been doing too much C ;-). Closes #7518.
Branches
trunk
cboos
0.12dev: merged [8189:8193/sandbox/rework-testing], alternate db backend for unit-tests and Makefile improvements.
Branches
trunk
cboos
Follow-up to r4333, fix the attachment unit tests. The remaining `attachment:` TracLinks tests were moved to tests/wikisyntax.py, with the others already there. Plus added a few `raw-attachment:` tests.
Branches
trunk
cmlenz
Enable `AttachmentModule` tests which were apparently disabled by accident. Fixed them up, but the fixes don't seem entirely right. (Christian, can you please look into fixing these tests properly?)
Branches
trunk
cmlenz
Improved API for checking permissions: * instead of `perm.has_permission('FOO')` use `'FOO' in perm` * instead of `perm.assert_permission('FOO')` use `perm.require('FOO')` The old API still works but should be considered deprecated.
Branches
trunk
cboos
Changed the `attachment:` link resolver syntax to: {{{ attachment:<file>:<the resource> }}} e.g. attachment:sample.pngticket123 This syntax is homogeneous with the new syntax for comment: (see r3825 and the [comment:ticket:2168:7 original proposal]). This new syntax style: {{{ <resolver>:<detail>[:<optional resource>]` }}} is more general and is better suited for eventually locating "nested" resources (like a comment for an attachment).
Branches
trunk
cboos
Finish to make unit tests more robust in case there's a global trac.ini. Actually, there were a lot less remaining cases than I initially thought, as lots of `from trac.config import Configuration` lines were useless. Closes #3700.
Branches
trunk
cboos
Make sure attachment size and time properties are `int` values. Closes #3557. Thanks to steffenp for the patch.
Branches
trunk
cmlenz
Integrated config fixes from #3037.
Branches
trunk
jonas
Merged sandbox/unicode in trunk.
Branches
trunk
cboos
Follow-up to [2072], as the "?format=raw" modifier was not taken into account for foreign attachment links.
Branches
trunk
cboos
Small fixes for attachments: * Attachment unit tests could fail when the timestamps are identical. Fix contributed by David James. * Fixed a typo in attachment.py spotted by lelit.
Branches
trunk
cmlenz
Allow format parameter in attachment links. Closes #1929. Thanks to Shunichi Goto for the patch. Also, added unit tests for the attachment wiki links.
Branches
trunk
cmlenz
Allow deleting an attachment even if the file is no longer present for some reason. Closes #1558.
Branches
trunk
cmlenz
* Extend the {{{IEnvironmentSetupParticipant}}} so that is also involved with upgrades. * Factored out initialization related to attachments and templates into the {{{trac.attachment}}} and {{{trac.web.chrome}}} modules, respectively.
Branches
trunk
cmlenz
Make sure attachments can only be uploaded inside the environment attachments directory.
Branches
trunk
cboos
Attachment unit tests fixed on Windows. Thanks to Ian Leader for the patch provided in #1608.
Branches
trunk
cmlenz
Refactored attachments functionality to provide an {{{Attachment}}} object that encapsulates database (and file-system) access to attachments.
Branches
trunk