Commit graph

2394 commits

Author SHA1 Message Date
Lukas Fleischer
b3a2b6c4a5 Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:27:00 +01:00
Lukas Fleischer
8b791dee91 Merge branch 'maint' 2013-01-30 09:25:42 +01:00
canyonknight
65e93f134f acctfuncs.inc.php: Change wording of account editing message
An error message is printed when the number of affected rows is
0 for an edited account. A count of 0 doesn't imply an error,
only that no changes were made in the database.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:30 +01:00
canyonknight
150b0f9f0a Clear a user's active sessions following account suspension
A suspended user can stay in active sessions. Introduce new function
delete_user_sessions to remove all open sessions for a specific user.
Allows suspensions to take effect immediately.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:30 +01:00
canyonknight
aab6eed138 Replace permission check code with can_edit_account()
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:29 +01:00
canyonknight
1fd620cc2f acctfuncs.inc.php: Change return type of valid_username function
The function is only determining whether a username is valid,
so it makes more sense to simply return a boolean value.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:29 +01:00
canyonknight
a61d73d804 aur.inc.php: Fix PHP undefined index notice for AURSID
Occurs in the rare situation where a logged out user tries to POST
a CSRF token.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:29 +01:00
canyonknight
e4ad05533f pkg_details.php: Add missing translatable string
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-30 09:25:27 +01:00
Lukas Fleischer
49e6184508 Merge branch 'maint' 2013-01-19 12:21:26 +01:00
canyonknight
07edcdab17 stats.inc.php: Remove unnecessary account type lookup
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:21:16 +01:00
canyonknight
d23a870671 user_table.php: Remove unused link parameter
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:21:12 +01:00
Marcel Korpel
fcb30db59f Remove double htmlspecialchars
This is already done in header.php; doing this double will result
in &amp; in title element

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:21:04 +01:00
Marcel Korpel
398fdb67ea We live in 2013 now
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:20:50 +01:00
Marcel Korpel
7f6993be68 Added RewriteRule for Apache
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:20:25 +01:00
Marcel Korpel
8e1051932e Add description meta-element to package pages
Implements FS#33294

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:18:13 +01:00
Marcel Korpel
b004333ead Implemented typeahead suggest
Use Twitter Bootstrap JavaScript framework for typeahead support.

Add a new "suggest" JSON method, which returns the first 20
packages that match the beginning characters of a query.

canyonknight: Link format change, commit message
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-01-19 12:17:55 +01:00
Lukas Fleischer
b8f07c4c45 Merge branch 'maint' 2012-12-22 17:03:43 +01:00
Marcel Korpel
987faad145 Changed 'Dutch' to 'Nederlands'
Supported languages are listed in their native language. Only Dutch is
in English. Translate reference into Dutch.

canyonknight: Commit message clarity

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-22 17:01:54 +01:00
canyonknight
d7dad5e6c7 gendummydata.py: Open all files with UTF-8 encoding
Users with certain locales are unable to generate dummy data.
Enforce UTF-8 encoding.

Fixes FS#32986

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-22 17:01:14 +01:00
canyonknight
cc1a0776c5 gendummydata.py: Remove need for fortune subprocess
Fortune calls slows down the generation of dummy data dramatically
for large datasets. Read from a specified fortune file directly
to avoid the need for the subprocess.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-22 17:01:03 +01:00
Lukas Fleischer
fce4f36e4f Merge branch 'maint' 2012-12-07 23:24:22 +01:00
canyonknight@gmail.com
20407bb8c6 Split package flagging and unflagging into separate functions
Currently, package flagging and unflagging takes place within the
pkg_flag() function. A bool is set to true or false depending on the
action.

Create new pkg_unflag() function with sole purpose of unflagging
and keep pkg_flag() in place. This split will be useful in the
overhaul of the notification system.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-07 23:24:11 +01:00
Marcel Korpel
332875bbfe INSTALL: Change # to $ where possible
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-07 23:24:00 +01:00
Marcel Korpel
ce01cfebcc INSTALL: Current PHP has JSON support without extension
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-07 23:23:58 +01:00
canyonknight
c1c3aef74a INSTALL: Update required dummy data packages
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-07 23:23:56 +01:00
Marcel Korpel
4187b2eb65 systemd compatibility
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-12-07 23:23:44 +01:00
canyonknight
ec332bb7e6 Fix account privilege escalation vulnerability
A check is only done to verify a Trusted User isn't promoting their
account. An attacker can send tampered account type POST data to
change their "User" level account to a "Developer" account.

Add check so that all users cannot increase their own account
permissions.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-29 23:23:12 +01:00
canyonknight
87fe4701cd Fix account editing and hijacking vulnerability
Checks are in place to avoid users getting account editing forms
they shouldn't have access to. The appropriate checks before
editing the account in the backend are not in place.

This vulnerability allows a user to craft malicious POST data to
edit other user accounts, thereby allowing account hijacking.

Add a new flexible function can_edit_account() to determine if
a user has appropriate permissions. Run the permission check before
processing any account information in the backend.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-29 23:23:10 +01:00
canyonknight
c7d20163a4 index.php: Move voter page token check to switch control structure
Voter page token check takes place in the same way as other
existing token checks. Move the check for consistency.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-24 13:20:44 +01:00
canyonknight
e383205eda login.php: Properly link to logout page when already logged in
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-24 13:20:35 +01:00
canyonknight
0e923bd11e gendummydata.py: Remove extra letter from dummy pkgrel
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-15 20:03:33 +01:00
canyonknight
16a20693be pkgfuncs.inc.php: Rework query to avoid "Required by" duplicates
Packages with multiple DepConditions are returned multiple
times in the "Required by" column.

Limit SQL results to distinct packages.

Fixes FS#32478

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-15 20:03:33 +01:00
Lukas Fleischer
dd61e561a0 Release 2.0.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-07 01:00:43 +01:00
canyonknight
4161e14796 pkg_details.php: Fix potential XSS for package names and dep conditions
Package names and dep conditions can be specially crafted for an XSS
attack. Properly sanitize these variables on the package details page.

In addition, avoid including dep conditions as part of a package link.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-07 00:59:28 +01:00
Lukas Fleischer
630f1cbae8 Avoid use of "$_SERVER['REQUEST_URI']"
Use the routing library to build proper URIs instead of relying on the
"REQUEST_URI" server variable which can be manipulated and might return
bogus URIs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 19:19:32 +01:00
Lukas Fleischer
f190a84577 Avoid double slashes in notifications
Both get_pkg_uri() and get_user_uri() should always return root-relative
URLs -- do not prepend another "/".

Fixes FS#32460.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 19:19:22 +01:00
Lukas Fleischer
9169c3a7ac routing.inc.php: Return proper (non-virtual) URIs
Make sure we always return root-relative URIs in get_pkg_uri() and in
get_user_uri() and prepend a slash ("/") if the virtual URL feature is
disabled.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 19:14:11 +01:00
Lukas Fleischer
789245077d pkgsubmit.php: Show a warning for split packages
Display a special error message if the package is identified as split
package.

Currently, the AUR displays a very vague error message when a split
package is submitted ("Invalid name: only lowercase letters are
allowed"). This often caused confusion among package submitters, see
FS#22834 and FS#32450.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 18:03:18 +01:00
Lukas Fleischer
73656e17bd pkg_details.php: Remove plural from the adopt/disown button
Fixes FS#32455.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 17:08:35 +01:00
Lukas Fleischer
274182a424 Add missing internationalization to a few strings
Fixes FS#32449.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 17:08:31 +01:00
Lukas Fleischer
4e4db4133b header.php: Do not lowercase language selection entries
Commit 091c2b5f55 introduced lower casing
to the language drop-down list. Revert this and use htmlspecialchars()
to escape language entries instead.

Addresses FS#32453.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 16:49:47 +01:00
Lukas Fleischer
406686bc22 Release 2.0.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 11:15:10 +01:00
Lukas Fleischer
b3dd31bf17 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 11:12:04 +01:00
Lukas Fleischer
2193676098 UPGRADING: Remove reference to Archive_Tar
The Archive_Tar PEAR module is no longer needed as of commit
acdf9a85a0. Remove the associated
upgrading instruction.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-11-04 11:10:01 +01:00
Lukas Fleischer
69e2d1dcff Return 404 for invalid account/package subpages
Display an error page and return a 404 status code in the following
cases:

* An invalid package name is passed to the "packages" action.
* An invalid user name is passed to the "account" action.
* An invalid package action is passed.
* An invalid account action is passed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-30 14:56:43 +01:00
canyonknight
9fd4845d16 pkgsubmit.php: Check that there is one directory in a tarball
Users are able to upload tarballs without a directory.
The directory count for a tarball is available, so use it to
display an error when there is not a single directory.

This patch has no effect on users who generate their uploaded
tarballs using makepkg. All other users must include a directory
in their tarball.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-29 12:28:45 +01:00
Lukas Fleischer
985a2ed49c home.php: Remove unneeded tables
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-28 19:56:27 +01:00
Lukas Fleischer
6897bb0097 Implement word-wrap for package statistics
Word-wrap labels in the package statistics box, just as we wrap package
names in the "Recent Updates" box.

Addresses FS#32160.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-28 02:17:54 +02:00
canyonknight
acdf9a85a0 Add Archive_Tar class to lib/
Some AUR setups do not have PEAR available. While other setups
have access to outdated Archive_Tar versions. Avoid these
problems completely by including the necessary files for
Archive_Tar in lib/.

Remove Archive_Tar requirement from INSTALL doc.

Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-10-27 18:13:46 -04:00
Lukas Fleischer
afaa2404ac Release 2.0.0-rc2
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-22 18:44:46 +02:00