Commit graph

357 commits

Author SHA1 Message Date
Dan McGee
d1d0288598 Add action lookup helper function
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:15 +01:00
Dan McGee
984ce9529c Improve cookie handling
* Remove comment that is mostly bogus- the domain is automatically set.
* When logging out, don't delete the language cookie.
* Make the language cookie persistent.
* Use the minimal time possible to expire cookies; no need to compute
  anything.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:13 +01:00
Dan McGee
90485e8f42 Fix potential injection vulnerability
We trusted the values we pulled out of the IDs array and never coerced
them to integers, passing them to the backend unescaped and uncasted.
Ensure they are treated as integers only and validate the resulting
value is > 0.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-01 20:27:49 +01:00
Lukas Fleischer
1e3fa38de5 Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:19 +01:00
Lukas Fleischer
2e1ce869ec Reject blacklisted packages on initial submission only.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-25 11:18:02 +01:00
Lukas Fleischer
09d8128f99 Protect users against ZIP bombs (fixes FS#22991).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-23 11:17:27 +01:00
Lukas Fleischer
4b2b8afb8a Reject packages with subdirectories (fixes FS#22995).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21 19:19:53 +01:00
Lukas Fleischer
31b0b68b47 Automatically adopt when updating an orphan package (fixes FS#22992).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21 17:56:19 +01:00
Lukas Fleischer
bc207d25cd Use move_uploaded_file() instead of rename() in "pkgsubmit.php".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21 17:07:51 +01:00
PyroPeter
3d6c6cc98a Support for langauges written right-to-left
Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 13:52:38 +01:00
PyroPeter
346e82716b pkg_search_results: replace blind-table with floating divs
* I tried to remove errors in the sgml-structure
  e.g.: <div>
          <?php if (foo) { ?>
            </div>
          <?php } ?>
* I did not remove or add code (except the <table> and <div> stuff, of cause).
  I only changed the order of the html/php-tags.
* The bottom and top of the script are now properly indented.
  I did not indent the middle part (table of search results) because that would
  render the diff completely useless.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 13:52:35 +01:00
PyroPeter
1fdecbd5a4 pkg_search_results: rewrite of pagination
* Most of the PHP-code was moved to pkgfuncs.php to keep the template simple.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-17 18:54:26 +01:00
Lukas Fleischer
b69f548065 Add a package name blacklist.
Can be used to blacklist package names for normal users. TUs and
developers are not affected. This is especially useful if used together
with a cron job that updates the blacklist periodically, e.g. to reject
packages which are available in the binary repos (FS#12902).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:22 +01:00
Lukas Fleischer
e3bde91f6d Minor variable parser bug fix (cf. commits 492c8c66, 7a58e99e).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-02 17:18:27 +01:00
Lukas Fleischer
8e32767c70 Parse versioned deps correctly when using "<" or ">" (fixes FS#22679).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-02 17:05:58 +01:00
Lukas Fleischer
366ea03118 Remove "FSPath" column from "Packages" table.
This field is not used anymore, so drop it from the table and remove all
references.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 15:01:56 +01:00
Lukas Fleischer
7a58e99eab Improve PKGBUILD variable parser correctness (cf. commit 492c8c66).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 12:41:15 +01:00
Dan McGee
7f5af61c88 Drop PackageLocations table and references
We don't need this anymore since all packages managed here are
well...managed here. Rip out all of the places we were using this field,
many of which depended on the magic value '2' anyway.

On the display side of things, we had a column that was always showing
'unsupported' that is now gone, and you can no longer sort by this column.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 12:41:08 +01:00
Lukas Fleischer
492c8c668f Avoid infinite loop in PKGBUILD variable parser (fixes FS#19482).
Improves variable substitution in the PKGBUILD parser a bit to avoid
infinite replacement loops when a PKGBUILD contains assigments of the
form "foo=${foo[@]}bar".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-28 17:40:02 +01:00
Lukas Fleischer
888aad477c Use UTF-8 in RSS feeds (fixes FS#10706).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-28 15:42:29 +01:00
Lukas Fleischer
389d3a552e Replaced rm_rf() by rm_tree().
Implemented recursive directory deletion in PHP properly without the use
of exec(). This improves security, performance and portability and makes
the code compatible with PHP's Safe Mode as well as with PHP setups that
disable exec() using the "disable_functions" directive.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-25 10:45:52 +01:00
Lukas Fleischer
2c098d73a2 Removed links to internal sources from package details.
Tarball extraction code has been removed in commit
ec0dfc27de, so links to package sources
contained in the source tarball itself will no longer be accessible
through the AUR frontend.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-25 10:07:34 +01:00
Lukas Fleischer
556de318ae Build URLs from package names (fixes FS#15308, FS#19327).
Drop the "URLPath" field from the "Packages" table, build URLs from
package names instead.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-24 18:08:29 +01:00
Lukas Fleischer
0bb2a7b514 Black fonts for out-of-date rows in search results (fixes FS#20514).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-20 20:45:13 +01:00
Lukas Fleischer
ec0dfc27de Removed code for tarball extraction.
Automatic tarball extraction was vulnerable in different ways. Users
should also only use source tarballs to build packages, so this has been
removed completely. From now on, only the PKGBUILD is extracted in a
secure manner.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-19 23:18:09 +01:00
Andrea Scarpino
a417224988 Do not display current votes in All Votes, and rename it as Past Votes
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-12-04 23:03:33 -05:00
Dan Vratil
57a5cbfd88 Auto redirect from confirmation screens.
Finally move comment deletion and category editing into functions and
remove pkgedit.php

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
-Fix indentation
-Fix variable naming conflict $id vs $cid
2010-11-21 03:37:17 -05:00
Lukas Fleischer
01fc2024cb Bold links in the archnavbar header.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-11-21 02:32:41 -05:00
Lukas Fleischer
eda713032c Add timestamp when a package is flagged out-of-date (FS#20848).
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
- resolve conflict and omit i18n changes.
2010-11-10 14:50:35 -05:00
Loui Chang
dc8265a962 Set background-color to white.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-11-02 21:15:40 -04:00
Loui Chang
d13f2af079 Modify some strings for translation.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-10-07 23:07:01 -04:00
PyroPeter
a4458e75bd Fix the search-button to allow captions wider than 80px (e.g. in german translation)
Change width to min-width. - Loui

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-08-11 20:00:31 -04:00
Denis Kobozev
b22f66b3ee Header and navbar consistent with Arch site redesign
-- Loui Chang
Change is_tu to check_user_privileges
Change div#archdev-navbar style

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-23 05:40:15 -04:00
Lukas Fleischer
b5bc6ab742 Confirmation when deleting packages
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-01 21:19:18 -04:00
Andrea Scarpino
f08fbbe80e pkgsubmit: Remove build function check
Closes: http://bugs.archlinux.org/task/19914

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-23 19:17:23 -04:00
mickael9
3f47ee740d pkgsubmit: store the previous path with getcwd()
This solves the problem of include files not being found after an error.
$_SERVER['DOCUMENT_ROOT'] is not reliable because the AUR might be
installed in a subdirectory.

This closes http://bugs.archlinux.org/task/16887

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-05 00:56:33 -04:00
Denis
290c436046 Support for storing salted passwords
To upgrade existing databases:

ALTER TABLE Users ADD Salt CHAR(32) NOT NULL DEFAULT '';

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-04-17 16:50:24 -04:00
Loui Chang
d53901eecd packages.php: Fix explicit sorting when search keywords aren't specified.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-13 00:03:00 -05:00
Loui Chang
a298948d92 titlelogo.png: Update again
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-12 16:52:07 -05:00
Loui Chang
b6e012ea3b packages.php: Only sort by vote if search keyword isn't set.
People entering explicit search terms would expect alphabetical order.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-03-12 16:47:48 -05:00
Loui Chang
dca1cfa7f3 Update Arch Linux titlelogo.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-02-25 21:29:57 -05:00
Loui Chang
55dcf5ce87 tu.php: Sort votes by descending date.
Also make syntax more straightforward.
'asc' is ascending, rather than 'up'.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-12-26 14:36:05 -05:00
Loui Chang
b51458f752 packages.php: Check if _GET value is set before assuming a default.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-12-15 22:39:14 -05:00
Loui Chang
9c1781f03d packages.php: Make default view sort packages by descending votes.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-12-15 11:15:43 -05:00
Loui Chang
2f0a1911be Change legend style and default font size.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24 13:14:03 -05:00
Loui Chang
6c327efaf3 Reposition language menu in the header.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24 00:55:21 -05:00
Loui Chang
143ed617c2 pkgsubmit.php: Remove redundant error message.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24 00:55:03 -05:00
Loui Chang
7b19866f2d Remove obsolete images.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-24 00:06:33 -05:00
Loui Chang
b462c6fc43 Bring TU addvote into the current layout.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-23 23:57:41 -05:00
Loui Chang
1bc4836e19 Restyle the layout.
Make HTML markup more logical.
Remove some unused style sheets rules.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-23 23:24:56 -05:00