Commit graph

2842 commits

Author SHA1 Message Date
Lukas Fleischer
cda832cbf0 Fix SQL query used for creating new accounts
Fixes a regression introduced in 608c483 (Add user set timezones,
2017-01-20).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-27 18:19:08 +01:00
Lukas Fleischer
69f7eb115a Merge branch 'master' into maint 2017-02-26 10:30:16 +01:00
Lukas Fleischer
5fd417d701 Release 4.5.0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-26 10:28:34 +01:00
Lukas Fleischer
e4bc2e7af3 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-26 10:28:03 +01:00
Lukas Fleischer
d0a7a70e2d Update message catalog 2017-02-25 13:41:22 +01:00
Lukas Fleischer
b205275196 pkgreq_results.php: Hide empty table
Display a message that no requests matched the filter criteria instead
of showing an empty package requests table.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-25 13:09:01 +01:00
Lukas Fleischer
29a48708bb Use bcrypt to hash passwords
Replace the default hash function used for storing passwords by
password_hash() which internally uses bcrypt. Legacy MD5 hashes are
still supported and are immediately converted to the new format when a
user logs in.

Since big parts of the authentication system needed to be rewritten in
this context, this patch also includes some simplification and
refactoring of all code related to password checking and resetting.

Fixes FS#52297.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-24 22:04:49 +01:00
Lukas Fleischer
31754909b1 Fix user name in disown notifications
Do not overwrite the $uid variable when updating co-maintainers.

Fixes FS#52225.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-24 21:25:03 +01:00
Lukas Fleischer
08f56e76d7 Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-23 07:42:25 +01:00
Morten Linderud
65b75568cb Add security tracker into navbar
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-23 07:36:57 +01:00
Lukas Fleischer
5059056567 Fix several PHP short open tags
Use "<?=" instead of "<?" for printing.

Fixes a regression introduced in a9048bb (Dedupe translatable strings,
2015-11-25).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 22:05:03 +01:00
Lukas Fleischer
e724b123ec pkgbase.php: Add default title
Instead of triggering a PHP warning and using an empty title if no
package base is specified, use a default title.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 22:01:34 +01:00
Lukas Fleischer
92049e8061 Hide old requests from the dashboard
Only show package requests created less than 6 months ago on the
dashboard.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 07:23:06 +01:00
Lukas Fleischer
b3fdd3f803 Add a parameter to skip old requests to pkgreq_list()
Allow for hiding requests which were opened before a given time stamp.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 07:13:01 +01:00
Michael Straube
f4176a8ce1 Make aurjson error messages consistent
All error messages in aurjson except two end with a period. Add the
missing periods to make the messages consistent.

Signed-off-by: Michael Straube <straubem@gmx.de>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-14 20:41:50 +01:00
Janne Heß
9df1bd5fe2 Add direct links to each source file
Currently, each source file which is an external link (http://,
https://, ...) is a clickable link.

This commit extends the behaviour by making files from the repository
clickable as well. The link brings the user to the corresponding cgit
page.

Also, the link to the PKGBUILD is altered to make the configuration more
consistent.

Signed-off-by: Janne Heß <jannehess@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-12 17:53:13 +01:00
Lukas Fleischer
3a167a109b Move package search links on the dashboard
Move the package search links below the section headings.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-12 12:42:47 +01:00
Lukas Fleischer
3ac5108db3 Move my packages to separate dashboard sections
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
2bc208c13e Add requests to dashboard
Add a new table which shows all package requests affecting the currently
logged in user.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
403241baa3 pkgreq_results.php: Add a flag to hide headers
Introduce a new boolean flag that can be used to disable extended
headers, pagination and forms.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
05007d8b1a pkgreq_results.php: Split out package results box
Do not include the wrapper div container in the template.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
ff8eb62a75 Add an option to filter by user to pkgreq_list()
When a user is specified, the function only returns package requests
which are either opened by the given user or affecting packages
maintained by the given user.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
d45585e36d Add flagged packages to the dashboard
Implement a table that shows all packages which are flagged out-of-date
and either maintained or co-maintained by the currently logged in user.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
880d25e98c Allow to search for both maintainer and co-maintainer
As a follow-up to commit 6cb8c04 (Implement co-maintainer search,
2017-01-26), add an option to search for both maintainers and
co-maintainers at the same time.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
1613bd2f29 confparser.inc.php: Support alternative config path
Add a AUR_CONFIG environment variable that can be used to specify an
alternative configuration file, similar to the feature introduced in
ecbf32f (git-interface: Add AUR_CONFIG environment variable,
2016-08-03).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
a1890d400b Add links to all owned packages to the dashboard
In addition to showing the 50 most recent maintained and co-maintained
packages, add links to all packages one owns or co-maintains.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:26 +01:00
Lukas Fleischer
555cdac2db Return the number of results in pkg_search_page()
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:26 +01:00
Lukas Fleischer
7d7e079326 Hide the table sorting links on the dashboard
The tables on the dashboard always show the 50 most recent packages,
ordered by last update. Do not make the table headers of these tables
clickable.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:26 +01:00
Lukas Fleischer
1049f93191 Add dashboard
For logged in users, the home page is replaced with an overview of the
packages the user maintains or co-maintains.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 11:20:59 +01:00
Lukas Fleischer
b6aced9692 pkg_search_results.php: Split out package results box
Do not print the wrapper div container when calling pkg_search_page().

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 00:36:55 +01:00
Lukas Fleischer
3b4c6e72a9 Refactor pkg_search_page()
* Pass search parameters using an associative array instead of $_GET.
* Add a boolean parameter to enable and disable headers/footers.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 00:36:17 +01:00
Lukas Fleischer
ac745f656d Split out the search form from pkg_search_page()
This makes it easier to display search results without showing the
search form.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-03 23:54:31 +01:00
Lukas Fleischer
6cb8c041bc Implement co-maintainer search
Add an option to filter package search results by co-maintainer.

Partly fixes FS#45591.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-28 11:23:40 +01:00
Lukas Fleischer
33095b3292 t1200: Test IP address log and bans
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25 18:42:34 +01:00
Lukas Fleischer
0e34dd6542 git-serve: Implement IP address bans
Currently, IP address bans affect the web interface only. Make sure they
are honored in the SSH interface as well.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25 18:42:34 +01:00
Lukas Fleischer
70db022aa8 Store banned IP addresses as plain text
Inspired by commit 32c8d0c (Store last login address as plain text,
2016-03-13).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25 18:42:34 +01:00
Lukas Fleischer
f8916d7e9b git-serve: Save last SSH login date and IP address
In addition to logging the last login date and IP address on the web
interface, store the time stamp and IP address of the last SSH login in
the database.

This simplifies user banning if one of the new SSH interface features,
such as the voting mechanism implemented in 7ee2fdd (git-serve: Add
support for (un-)voting, 2017-01-23), is abused.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25 18:42:34 +01:00
Lukas Fleischer
b8df10e227 config.proto: Update path to the notification script
As of commit 3718860 (Make maintenance scripts installable, 2016-10-17),
the notification script is installed as aurweb-notify. Update the
sample configuration file accordingly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-25 18:42:34 +01:00
Mark Weiman
1ed8471182 Show co-maintainers SSH clone URL on package base page
On package base pages, if a co-maintainer visits, only the read-only URL
is displayed which is inconsistent with how the individual packages of a
package base's pages displays them. This adds the SSH clone URL to the
package base's page for co-maintainers to see.

Implements FS#52675.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-23 09:29:50 +01:00
Lukas Fleischer
0b09f200c5 t1200: Add tests for vote/unvote
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-23 09:10:29 +01:00
Lukas Fleischer
7ee2fddcca git-serve: Add support for (un-)voting
Add support for voting for packages and removing votes from the SSH
interface. The syntax is `vote <pkgbase>` resp. `unvote <pkgbase>`.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-23 09:10:28 +01:00
Mark Weiman
fc2ecff949 account.php: Reformat process_account_form() call
Modify the call to process_account_form() to only having one parameter per
line.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:51 +01:00
Mark Weiman
7ff5070190 Update cookie for language setting when editing user information
Currently, when a user edits their language setting from the edit user form,
the changes aren't reflected until the user either lets the original cookie
expire, deletes the cookie manually, or changes the language a second time via
the dropdown menu on the top of the page. This patch makes the language cookie
get updated when it is changed from the edit user form.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:51 +01:00
Mark Weiman
608c483090 Add user set timezones
Currently, aurweb displays all dates and times in UTC time. This patch
adds a capability for each logged in user to set their preferred
timezone.

Implements FS#48729.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:40 +01:00
Lukas Fleischer
087b539cbc Document garbage collection settings for Git
Add a note to the Git/SSH interface documentation that we recommend to
disable automatic garbage collection and use a maintenance script to
cleanup and optimize the Git repository instead.

Also, add a reference to the Git/SSH interface documentation to the Git
repository setup instructions in INSTALL.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-17 08:50:21 +01:00
Lukas Fleischer
ecfa54e492 INSTALL: Refer to the AUR backend as aurweb
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-12 08:35:15 +01:00
Alex Muller
eb4ba5cfdb Increase minimum password length to 8 characters
There are 95 printable ASCII characters which with a minimum length of 4
gives 95^4 or 81 million possible passwords. Increasing the minimum
length to 8 increases the number of possible passwords by a factor of
about 10^7.

Relates to FS#52297.

Signed-off-by: Alex Muller <alex@mullr.net>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-07 17:38:38 +01:00
Lukas Fleischer
8914a41db9 git-serve: Use Python exceptions for error handling
Make it easier to reuse the helper functions provided by git-serve from
another Python script by throwing exceptions instead of terminating the
program on errors.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-12-23 20:05:05 +01:00
Lukas Fleischer
6d8edafe77 t1200: Add tests for flag/unflag
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-12-20 18:04:46 +01:00
Lukas Fleischer
e0d94f54c3 git-serve: Add support for (un-)flagging packages
Add support for flagging or unflagging packages from the SSH interface.
The syntax is `flag <pkgbase> <comment>` resp. `unflag <pkgbase>`.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-12-20 18:04:46 +01:00