Commit graph

2971 commits

Author SHA1 Message Date
Dan McGee
b9690972d0 Use a single transaction to write dummy data
This is immensely faster when using InnoDB since we don't need to sync
after each and every INSERT statement.

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
fcaee28818 Small template cleanup
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
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
a10ce40cbe AUTHORS: Move Callan from "Current Maintainers" to "Contributors".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-28 10:25:08 +01:00
Lukas Fleischer
c8cd12c61e AUTHORS: Rename "Current Contributors" to "Current Maintainers".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-28 10:24:57 +01:00
Lukas Fleischer
f89ba3fb6d Remove database recreation code from "support/schema/reloadtestdb.sh".
Database is being dropped and recreated in the schema, so there's no
need to do this in "reloadtestdb.sh" as well.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-28 09:45:29 +01:00
Loui Chang
c638a89314 Specify utf8 in database schema.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-28 09:38:14 +01:00
Lukas Fleischer
24c628ad43 Add note on merging "web/lib/config.inc.proto" to "UPGRADING".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:30 +01:00
Lukas Fleischer
bc238965cb Fix some minor bugs in "support/schema/gendummydata.py".
The dummy data generation script used to create wrong package IDs for
both "PackageVotes" and "PackageDepends" tables which led to errors when
reloading the test data (constraints failed). This is fixed by no longer
creating entries with zero ("0") package IDs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:30 +01:00
Florian Pritz
85c0db0ccd Set the character set when connecting to mysql
We should not rely on the default server setting staying the same
forever.

Signed-off-by: Florian Pritz <bluewind@server-speed.net>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:30 +01:00
Lukas Fleischer
816a0cf8d7 Add "ENGINE = InnoDB" to "CREATE TABLE" statements in the SQL schema.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:29 +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
84c2491e63 Add note on upgrading from MyISAM to InnoDB to "UPGRADING".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 16:29:40 +01:00
Lukas Fleischer
40ccf77ca0 Define "PackageComments.DelUsersID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 16:20:02 +01:00
Lukas Fleischer
ac632980c3 Add missing foreign keys and constraints to the DB.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-26 21:11:25 +01:00
Lukas Fleischer
e72f02872f Use a real sync algorithm in aurblup (fixes FS#23039).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-26 20:41:04 +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
f961ffd9c7 Add a per-user session limit (fixes FS#12898).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-23 11:17:26 +01:00
Lukas Fleischer
c39183c3ee Add ability to search for non-out-of-date packages (fixes FS#17896).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-22 18:33: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
Wieland Hoffmann
743cffe7d1 Fix typo in "web/lib/pkgfuncs.inc".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21 18:56:38 +01:00
Lukas Fleischer
52dfa9ca7c Make persistent cookie timeout configurable via "config.inc" (FS#22994).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-21 18:17:58 +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
Lukas Fleischer
a77420126b Release 1.8.0.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-20 18:40:48 +01:00
Lukas Fleischer
c08379ebbd Add myself to "AUTHORS".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 14:42:56 +01:00
Lukas Fleischer
7cc4582524 "TODO" cleanup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 14:42:52 +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
0de4ce61be Add note on InnoDB compatibility to "UPGRADING".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-15 08:29:28 +01:00
Lukas Fleischer
aaa4bb5e2d Add note about aurblup to "UPGRADING".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 15:23:23 +01:00
Lukas Fleischer
c332c0a0f5 Update aurblup "README".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:24 +01:00
Lukas Fleischer
5905577694 Use VARCHAR instead of CHAR in "PackageBlacklist" table.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:24 +01:00
Lukas Fleischer
a64cd12feb Add support for MySQL transactions to aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
13bcc269ff Fix typos in aurblup source and "README".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
ddc54358d0 Add packages' provides and replaces to the blacklist in aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:23 +01:00
Lukas Fleischer
48957ef5d5 Fix memory leak in aurblup.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:22 +01:00
Lukas Fleischer
400d7845e4 Add AUR package blacklist updater (aurblup).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-11 14:43:22 +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
881bfcced4 Remove unused fulltext index from "Packages" table.
Drop fulltext indexes, which prevent the use of InnoDB, from "Packages"
table. All search routines use "LIKE" patterns, so fulltext search has
actually never been used.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-10 08:17:53 +01:00
Lukas Fleischer
0e0e80aeea Minor bugfix in pkg_change_category().
This cleans up some broken MySQL query introduced by commit 57a5cbfd.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-09 08:58:44 +01:00
Lukas Fleischer
6d737c4684 Use VARCHAR instead of CHAR where appropriate.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-09 08:46:27 +01:00
Lukas Fleischer
31083dc12d Show submitter in package details (fixes FS#15488).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-08 18:40:51 +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
34ac351e82 Drop "PackageContents" table and references.
We don't even touch source tarballs anymore - except for extracting the
PKGBUILD, so this is no longer needed.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 15:16:29 +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