Commit graph

2406 commits

Author SHA1 Message Date
Lukas Fleischer
fd6ba76431 Make copyright notice translatable
Fixes FS#46747.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:48 +02:00
Lukas Fleischer
34800e5ecf notify: Fix welcome/flag notifications
Fixes two regressions introduced in commit 6681e56 (notify: Do not wrap
references, 2015-10-03).

Fixes FS#46742.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:48 +02:00
Lukas Fleischer
092e00f468 notify: Fix references in request notifications
When sending notifications upon request creation, set an initial message
ID instead of setting the Reply-To and References headers.

This used to work but the behavior was unintentionally changed in
9746a65 (Port notification routines to Python, 2015-06-27).

Fixes FS#46645.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:48 +02:00
Lukas Fleischer
c76499993f notify: Split out email header generation
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-17 17:31:46 +02:00
Lukas Fleischer
1f6237ffa7 aurjson: Rename the search_by parameter to "by"
This parameter is only supported by the search command. We do not need
to repeat ourselves.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-09 17:35:51 +02:00
Lukas Fleischer
9d8345d4e0 rpc.php: Display generated documentation
Instead of hardcoding the RPC interface documentation in rpc.php,
include the HTML code of the documentation page generated by AsciiDoc.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
a99c0fe5d3 Add documentation Makefile
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
a8552f5444 Update RPC interface documentation
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
3c06716c72 aurjson: Merge info and multiinfo commands
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
261c7f74dd aurjson: Add "maintainer" search type
Deprecate the msearch command and add a new search type to the search
command.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:37 +02:00
Lukas Fleischer
bc2ee0c63f Add documentation of the RPC interface
Convert the RPC interface documentation from web/html/rpc.php to
AsciiDoc and add it to the documentation directory.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 09:30:08 +02:00
Lukas Fleischer
6681e56551 notify: Do not wrap references
When sending notifications, do not wrap lines from the references
section.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 18:12:40 +02:00
Lukas Fleischer
eb3b0d537d Release 4.1.1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 12:12:03 +02:00
Lukas Fleischer
62c13e2c0c Do not show ".SRCINFO unchanged" warning on restore
Since 612300b (Show a warning if .SRCINFO is unchanged, 2015-09-29), the
git-update script displays a warning when a ref update does not affect
the content of the package base meta data. We also invoke git-update to
rebuild the package base details in the aurweb database when a package
base is restored via the SSH interface. In that case, fake information
is passed to the update hook: Both the old and the new object IDs refer
to the current HEAD. Check for such "Everything up-to-date" updates and
not display the ".SRCINFO unchanged" in these cases.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 12:10:25 +02:00
Lukas Fleischer
4fe513d838 Do not redirect to details page after deletion
When deleting a package base from the package base deletion form, do not
try to redirect to the package base details page afterwards. Instead,
jump to the package overview.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:57:44 +02:00
Lukas Fleischer
90e96e3728 Redirect to details pages after performing actions
After performing a package base action on a separate page, return to the
corresponding package base details page.

Partly fixes FS#46545.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:28:04 +02:00
Lukas Fleischer
d0f8b285e4 Fix a PHP "Undefined index" notice
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:15:53 +02:00
Lukas Fleischer
d18a9638c6 Fix dependency sorting
Fixes a regression introduced in 9d2d8f1 (Honor virtual provisions in
package requirements, 2015-09-17).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:12:18 +02:00
Lukas Fleischer
f5b4f7e996 Fix parameter processing in parse_multiinfo_args()
Fixes a regression introduced in 94aeead (aurjson: Pass http_data array
to all functions, 2015-06-28).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:07:39 +02:00
Lukas Fleischer
c7fc6e6d33 Release 4.1.0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 09:28:18 +02:00
Lukas Fleischer
34153f41a9 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 09:26:32 +02:00
Lukas Fleischer
612300b39c Show a warning if .SRCINFO is unchanged
Warn users when a remote ref update does not change the content of
.SRCINFO such that users are reminded of updating package meta data.

Implements FS#46130.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-29 20:54:55 +02:00
Lukas Fleischer
693e4b50a3 Remove empty package bases after 24 hours
By using the setup-repo command, it is currently possible to create
empty package bases, which can be used to make package base
reservations. Add a maintenance script to remove such empty package
bases after 24 hours.

Fixes FS#46279.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-29 20:51:08 +02:00
Lukas Fleischer
fcb495874f AUTHORS: Add date ranges to current maintainers
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-29 20:51:03 +02:00
Lukas Fleischer
e66595fb92 Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-26 07:49:27 +02:00
Lukas Fleischer
c67e5a1cdf aurjson.class.php: Sync error message with front-end
Instead of introducing a new message "You do not have the right to edit
this comment." for the RPC interface, use "You are not allowed to edit
this comment." which we already show in the front-end.

Reported-by: Christoph Seitz <seitz.christoph@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-26 07:43:10 +02:00
Lukas Fleischer
938b1058eb pkgfuncs.inc.php: Squelch PHP warning
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-25 08:35:44 +02:00
Lukas Fleischer
2f8e0dfa3a aurjson.class.php: Fix "Undefined index" notices
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-25 08:35:43 +02:00
Marcel Korpel
df160b61e8 Make it more clear that the bug tracker is for aurweb only
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-24 07:05:28 +02:00
Lukas Fleischer
311c7f0366 Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-23 21:46:33 +02:00
Marcel Korpel
4516f07d9c Add search for keywords only
Implements FS#45619.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-23 21:45:47 +02:00
Marcel Korpel
d5d08b8f92 Add option to hide one's email address
Implements FS#42343.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-20 22:01:23 +02:00
Lukas Fleischer
f3ec4d1ef5 Rename "Age" search order to "Last modified"
Use a better description for sorting by modification time, as it is not
clear whether "Age" refers to the package creation date or to the
modification date.

The possibility to sort by "Age" is kept internally (but hidden from the
user interface) such that old links to search results still work.

Fixes FS#46319.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-20 11:09:47 +02:00
Marcel Korpel
0478a0a2da Fix type of FlaggerUID in table PackageBases
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-19 15:19:16 +02:00
Lukas Fleischer
9cae17ff7c Extract package name from details
When requesting package details, instead of performing another SQL query
to obtain the package name, extract the name from the result of the
package details query.

Also, drop pkg_name_from_id() which is no longer needed after this
optimization.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-18 08:03:56 +02:00
Lukas Fleischer
0dd27a86b1 Remove legacy code
In 74edb6f (Use Git repositories to store packages, 2014-06-06), package
creation was moved to the Python backend. Remove several PHP functions
that are no longer needed.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-18 07:55:50 +02:00
Lukas Fleischer
9d2d8f1c8c Honor virtual provisions in package requirements
Implements FS#14125.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-17 23:04:58 +02:00
Lukas Fleischer
dd808ac802 Use a separate function for "Required by" links
Do not use the same function for generating dependency and inverse
dependency links. Instead, factor out common code and create two
separate functions for those (rather different) functionalities.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-17 19:06:18 +02:00
Lukas Fleischer
2c20403cc4 git-update: Use proper stop value for slice
Fixes a regression introduced in 4112e57 (Add a restore command to the
SSH interface, 2015-08-14).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-16 22:10:06 +02:00
Lukas Fleischer
34e7f7084a Transfer notifications when merging packages
When a package base is merged into another one, followers of the old
package base usually want to be notified about comments the new package
base as well.

Fixes FS#27687.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-16 22:05:40 +02:00
Lukas Fleischer
f9476c1093 Show providers in dependencies
For all "virtual provisions" in package dependencies, show links to the
actual packages providing the dependency.

This partly implements FS#14125.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-16 22:00:04 +02:00
Lukas Fleischer
209b0b6eda Mitigate JSONP callback vulnerabilities
The callback parameter of the RPC interface currently allows for
specifying a prefix of arbitrary length of the returned result. This can
be exploited by certain attacks.

As a countermeasure, this patch restricts the allowed character set for
the callback name to letters, digits, underscores, parenthesis and dots.
It also limits the length of the name to 128 characters. Furthermore,
the reflected callback name is now always prepended with "/**/", which
is a common workaround to protect against attacks such as Rosetta Flash.

Fixes FS#46259.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-12 10:20:03 +02:00
Lukas Fleischer
ee9a8f232b Allow for logging in via email address
Accept both user names and email addresses in the login prompt.

Suggested-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:18:31 +02:00
Lukas Fleischer
c5014b0752 Remove superfluous function valid_user()
This helper function was almost 100% identical to uid_from_username().
Switch to using uid_from_username(), which has a much better name and
implementation, everywhere.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:28 +02:00
Lukas Fleischer
396e50bdc8 Require comments when flagging packages out-of-date
Implements FS#42827.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:14:26 +02:00
Lukas Fleischer
6b7e26a2d1 Move package base flagging to a separate form
Show a separate confirmation page when flagging a package out-of-date.

Implements FS#44967.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-11 22:11:52 +02:00
Lukas Fleischer
209879d63f Fix duplicate escaping of action links
The __() helper function already escapes HTML special characters. Do not
escape them again in html_action_*().

Fixes FS#45780.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-31 18:04:50 +02:00
Lukas Fleischer
57db4814a4 Allow users to unflag packages they flagged themselves
Sometimes, a user accidentally flags a package out-of-date. Allow users
to unflag packages that they flagged themselves, thereby providing a way
to undo these actions.

Implements FS#46145.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-30 16:51:14 +02:00
Lukas Fleischer
e1a258bd83 Remember user ID when flagging package bases
Add a new FlaggerUID field to the database and use it to store the user
ID of the account who recently flagged a package out-of-date.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-30 16:44:12 +02:00
Marcel Korpel
57250a1641 updates_table.php: Fix identification of new packages
Currently, package creation has to be done separately from first
submission, so ModifiedTS will never be the same as SubmittedTS.
Consider all packages that are submitted within an hour from package
creation as new.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-08-19 09:49:28 +02:00