Commit graph

953 commits

Author SHA1 Message Date
Lukas Fleischer
253e76d8cc Add support for adding SSH public keys to profiles
Users can now add an SSH public key on the account edit page. This will
later be used to authenticate users via SSH.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:12 +01:00
Lukas Fleischer
1af375828f Use raw scanner mode in config_get()
We do not want PHP to parse the values for us. Use raw scanner mode to
avoid issues with certain values, such as regular expressions.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:42:11 +01:00
Lukas Fleischer
495455c28e Release 3.5.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-27 12:39:40 +01:00
Lukas Fleischer
5ebf534ba7 Avoid double slashes in notification email body
Refactor some of the URI generation code to avoid double slashes in
absolute URIs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-12-13 15:28:54 +01:00
Lukas Fleischer
aa2724bbfe Release 3.5.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-22 23:47:20 +01:00
Lukas Fleischer
e0c1caece5 Remove duplicate slash in the password reset URL
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
571b74b901 Always use virtual URLs
Support for non-virtual URLs has been broken for a long time and is no
longer used on the official AUR setup.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-11-21 11:43:31 +01:00
Lukas Fleischer
76343fb915 Use an INI-style configuration file
Replace web/lib/config.inc.php with an INI-style configuration file.
This allows us to get rid of several globals and makes it easier to use
the same configuration file in external scripts.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-24 10:03:54 +02:00
Lukas Fleischer
c64b51f2ee voters.php: Show time stamps if available
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-17 09:53:02 +02:00
Lukas Fleischer
e9ebcc4479 Add a time stamp to package base votes
This can potentially be used to identify trending packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-16 18:15:45 +02:00
Lukas Fleischer
c986ba0c52 Merge branch 'maint' 2014-10-11 11:27:04 +02:00
Lukas Fleischer
a1bee1a21e Add support for architecture-specific sources
As a follow-up to 4d7da95 (Add support for architecture-specific fields,
2014-08-10), handle architecture-specific source fields as well.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 12:29:18 +02:00
Lukas Fleischer
01fed360c2 Use proper email address in send_resetkey()
Fixes FS#41860.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-10 10:20:57 +02:00
Lukas Fleischer
2786c16bd5 Merge branch 'maint' 2014-10-03 13:18:04 +02:00
Lukas Fleischer
55586d9c22 Include proper timestamp in auto-accept emails
Fixes a regression introduced in c70b340 (Close requests before
accepting, 2014-07-29).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
76872d8b08 Fix permission check in pkgreq_close()
Make sure that requests can be auto-accepted if filed by a regular user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-10-03 13:17:38 +02:00
Lukas Fleischer
49f76cd53b Merge branch 'maint' 2014-08-11 22:50:01 +02:00
Lukas Fleischer
4d7da95906 Add support for architecture-specific fields
This adds support for architecture-specific dependencies and relations.
Support for this has recently been added to makepkg, see commit 2b556d8
(PKGBUILD: handle arch specific attributes, 2014-07-25) in the pacman
repository for details.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-10 12:32:46 +02:00
Lukas Fleischer
218ccf51e3 Add permission checks to the request feature
* Only show the request form to users that are logged in.
* Only show the close request form to Trusted Users and developers.
* Check for a valid login in pkgreq_file().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:48:58 +02:00
Lukas Fleischer
d61b34f255 Fix the return value of save_salt()
Return true if and only if the SQL query was executed successfully.
Logins with an unsalted password no longer fail now.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-08 11:38:00 +02:00
Lukas Fleischer
0613a637b3 Fix notification handling on submission and adoption
Automatically add users to the notification list when adopting a
package. This used to work bug was broken by 03c6304 (Rework permission
handling, 2014-07-15). Fixes FS#41426.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:09:05 +02:00
Lukas Fleischer
237a4570e2 Add PCRE_DOLLAR_ENDONLY to preg_match()
When using preg_match() to check for a match that starts at the
beginning of the string and ends at the last character of the string, we
do not want to allow an additional newline character to sneak in.
Amongst other potential loopholes, adding the PCRE_DOLLAR_ENDONLY
modifier prevents users from registering with user names that end with a
newline character.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-06 00:00:33 +02:00
Lukas Fleischer
13693fbdbc Release 3.4.3
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-02 15:27:42 +02:00
Balló György
92e827330c Count users in "Trusted User & Developer" group as TU
This reflects the changes in 3610f3c.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-08-02 15:25:46 +02:00
Lukas Fleischer
6d5c936540 Release 3.4.2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 18:33:54 +02:00
Lukas Fleischer
c70b340c41 Close requests before accepting
When auto-accepting a request, we need to close the package request
before performing the actual action (disown/deletion/merge). Otherwise,
the former maintainer is not included in the Cc list of the
acceptance/rejection notification email.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 17:59:26 +02:00
Lukas Fleischer
98235c834b Remove duplicate recipients from Cc
When a user files a request for a package maintained by himself, he is
currently included in the Cc list twice. Use array_unique() to omit
repeated entries.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 17:52:09 +02:00
Lukas Fleischer
d136d7c874 Allow users to delete their own comments
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15). Fixes FS#41379.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 15:17:58 +02:00
Lukas Fleischer
63f95bd86f Release 3.4.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:39:41 +02:00
Lukas Fleischer
4b5f8da5be Suppress PHP notice in process_account_form()
Add a check to remove a notice which is displayed after registration
since commit 03c6304 (Rework permission handling, 2014-07-15).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-29 14:39:10 +02:00
Lukas Fleischer
430bf97ca6 Release 3.4.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-28 14:30:37 +02:00
Lukas Fleischer
34aa226c66 Do not allow regular users to edit all accounts
Fixes a regression introduced in 03c6304 (Rework permission handling,
2014-07-15).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:33 +02:00
Lukas Fleischer
f4ee1278e5 Clean up user references in user_delete()
Explicitly clean up all references before deleting a user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +02:00
Lukas Fleischer
daceef50eb Make deleted comments visible to Trusted Users
This allows Trusted Users to check whether a user posted a politically
incorrect comment, even if he already deleted it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-25 11:30:32 +02:00
Lukas Fleischer
0a357a7d44 Add typeahead suggest to the merge request form
Add the typeahead implementation we already use for the package search
to the merge target text field. Instead of suggesting packages, suggest
package base names.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:30 +02:00
Lukas Fleischer
48ae736068 Prevent merging a package base with itself
Instead of deleting the package, show an error message if a user tries
to merge a package base with itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 17:53:28 +02:00
Lukas Fleischer
ed1e747847 Verify that the target of merge operations exists
Make sure that the target of a merge operation is either empty or an
existing package base name.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 15:11:59 +02:00
Lukas Fleischer
9048030da7 Drop support for source packages without .AURINFO
Disallow uploading source tarballs that do not contain .AURINFO. Also,
drop the PKGBUILD parser which is no longer needed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-23 10:48:48 +02:00
Lukas Fleischer
c36f0e885a Automatically accept orphan requests for old packages
If an orphan request is filed for a package that has been flagged
out-of-date for at least 180 days, it is disowned automatically.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-17 16:57:04 +02:00
Lukas Fleischer
d03f7a890f Fix pkgbase_votes_from_name()
In 676595f (Prefix package functions with pkg_/pkgbase_, 2014-04-05),
votes_for_pkgname() was renamed to pkgbase_votes_from_name() without
changing the semantics. Slightly adapt the implementation and interpret
the argument as a package base name instead of a package name. Also fix
the call site.

Reported-by: Felix Yan <felixonmars@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 19:22:58 +02:00
Lukas Fleischer
e9b13cef3f Mention the target of merge requests in emails
When sending the initial notification email for a merge request, include
the name of the package base that is the target of the requested merge
operation.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:11:23 +02:00
Lukas Fleischer
42d927366a Use Cc instead of Bcc in request notifications
Add the request creator and the current package maintainer to Cc instead
of Bcc when sending notification emails for package requests. This
allows users to forward any discussion to both of them by using the
"Group Reply" function of their MUA.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:55 +02:00
Lukas Fleischer
bfb253ef72 Bcc notification emails to the request creator
Add both the request creator and the current package maintainer to the
Bcc list of notification emails for package requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 11:09:30 +02:00
Lukas Fleischer
f8343e5a68 Remove unused function pkg_details_by_name()
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-16 10:33:01 +02:00
Lukas Fleischer
3610f3c6a4 Add a new user group "Trusted User & Developer"
This group has full permissions on everything.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:58:57 +02:00
Lukas Fleischer
1b901616dc Disallow privileged users to use invalid user names
Prevent Trusted Users and developers from accidentally using a name that
contains invalid characters. Also, remove user_is_privileged() which is
no longer needed after this change.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56:57 +02:00
Lukas Fleischer
03c6304e19 Rework permission handling
Add a new function has_credential() that checks whether the currently
logged in user is allowed to perform a given action. Moving all
permission handling to this central place makes adding new user groups
and adjusting permissions much more convenient.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-15 22:56:57 +02:00
Lukas Fleischer
9e6b861b6f Release 3.3.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-05 15:16:54 +02:00
Lukas Fleischer
111d836912 Display number of pending requests in actions box
For packages with pending package requests, display the number of
requests above the "File Request" link.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 12:28:12 +02:00
Lukas Fleischer
7f29756196 Handle plurals in translations
Use ngettext() to handle plurals properly. Also, split pagination
captions into two strings.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-07-04 12:16:58 +02:00