Commit graph

124 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Loui Chang
6ee8b88c58 pkgsubmit: Instruct users how to make source packages.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-11-09 18:53:34 -05:00
Loui Chang
de7c9ab787 Remove the plain PKGBUILD upload feature.
makepkg --source should be used to upload packages.
It provides a bit of error checking and it's good to support only a
single format here.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 19:24:19 -04:00
Dan McGee
46f2798524 Use include_once where applicable
All of these are sourcing function libraries so we don't need to include
them more than once. Things that insert actual HTML into the output were
left calling include().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:12 -04:00
Loui Chang
610733eafd Remove excess whitespace.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:05:44 -04:00
Callan Barrett
d25c177229 Turn on package notification by default for new packages
Version using package functions

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18 02:05:02 -04:00
Gergely Imreh
0427eebaa4 fix FS#13122 (again): removing comment removal as early as possible
comments need to be removed before concatenating lines, otherwise
not matched brackets can cause problems on submit

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18 01:54:44 -04:00
Loui Chang
74a75661d9 Tweak the bash parsing for package submission.
Better detection of the build function.
Better detection of variables.
Support for variables with underscores.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-01 11:55:59 -04:00
Gergely Imreh
f3a29356c5 Correct comment removal in pkgsubmit.php
This only neutralises bash parameter substitution, but doesn't perform
the proper replacement.

Closes FS#13122.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-16 11:56:23 -05:00
Gergely Imreh
efc1713787 Fix: FS#13189, infinite variable replacement cycle
Lines such as foo=$foo in the PKGBUILD would end up in a
infinite replacement cycle when uploaded, thus the upload
times out. In these kind of lines, $foo is replaced not by
"$foo" again, but deleted (missing value for foo).

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-15 15:12:28 -05:00
Gergely Imreh
2568851eac FS#2649, FS#12645: subsititution of all variables and "eval"
All custom variables are handled during subsitution, as well as
bash "eval" statements.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-28 03:26:23 -05:00
Loui Chang
2ee3276348 Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 16:29:45 -05:00
Gergely Imreh
5b01327f57 Fix: FS#12698 - AUR does not ignore comment lines in PKGBUILD source field.
The web interface was handling comments in the PKGBUILD variable fields
(such as 'source','depends',etc...) differently from makepkg, because
makepkg ignores the rest of the current line if there is a # character,
while the web interface parsed that as well, and listed the words of the
comment as source files.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-14 21:52:37 -05:00
Loui Chang
92643bb827 Don't require source or md5sum arrays in PKGBUILDs.
Also fix a translation string.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-08 11:47:49 -05:00
Dan McGee
207b565f1c Minimize calls to uid_from_sid()
Just like the previous patch for account_from_sid() over-usage.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04 14:28:24 -05:00
Loui Chang
35cff75156 Correct undefined constant error in pkgsubmit.
Clean up a couple of notices.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:44:57 -05:00
Loui Chang
ae1c424c95 Really make all web paths relative.
I forgot about the forms.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-22 13:19:56 +09:00
Loui Chang
78c2b5c67f Introduce function include_lang for translations.
This includes only the requested language for each page and
makes top level language include files obsolete.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-21 18:03:27 +09:00
Evangelos Foutras
fb1c41c6c6 Fix PKGBUILD source array parsing.
Fix for FS#11132 - AUR fails to parse multiline source array

Signed-off-by: Evangelos Foutras <foutrelis@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 13:25:44 -05:00
Callan Barrett
07a27f2f1d Add error checking to chmod on package submission
Try submitting an empty form to the aur

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 13:02:24 -05:00
Loui Chang
f12b11abc7 Give group writable permissions to uploaded files.
Add a new function chown_group to recursively change permissions.
Tweak some of the coding style.
Replace some of the redundant string concatenation with a variable.

Thanks to Dan McGee for chmod_group.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-13 15:19:26 -05:00
Loui Chang
a6147ab5ab Merge branch 'testing'
Conflicts:
	web/html/pkgsubmit.php

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-11-03 21:52:07 -05:00
Loui Chang
99881b31db Fix whitespace and indenting in pkgsubmit.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-09-13 15:35:32 -04:00
Simo Leone
c85dfacc74 Include File/Find.php PEAR module
Since this module requires root to install
system-wide, and is somewhat rare, it's better
to just include it in the AUR code itself.

Signed-off-by: Simo Leone <simo@archlinux.org>
2008-07-28 10:27:38 -05:00
Callan Barrett
5528501497 Redirect on package submission
On a successful package submit there will be a redirect to the package details
page of the packages, no more successful message

Also got rid of the $warning stuff, what the hell was that for?

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-07-09 14:26:13 -04:00
Loui Chang
3a42725601 Remove all vim mode lines. Add HACKING file.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-06-17 01:38:01 -04:00
Callan Barrett
dc5b3d674e Clean up of pkgsubmit.php
Moved some stuff around, rewrote some stuff although the functionality is
exactly the same as before

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-15 22:46:23 +08:00
Callan Barrett
604156950c Make use of PEAR packages in pkgsubmit.php
Uses File_Find and Archive_Tar in pkgsubmit.php
Removes references to PackageContents

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-12 02:30:17 +08:00
Callan Barrett
63d70dc84a Fix FS#8622
Previous fix for this was only half implemented, links now work with both
a new package and an updated one

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-09 19:51:25 +08:00
Callan Barrett
b2435996dd Fix FS#10016
Fix entry of URLPath and FSPath to be actual locations, fixes RPC results

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-09 19:49:07 +08:00
Callan Barrett
9dad329b6a Unmark out-of-date on update
What it says in the title

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-06-07 18:30:38 +08:00