Commit graph

36 commits

Author SHA1 Message Date
Lukas Fleischer
f3ce74c714 Merge branch 'maint'
Conflicts:
	web/html/account.php
	web/html/addvote.php
	web/html/pkgsubmit.php
	web/lib/acctfuncs.inc.php
	web/template/actions_form.php
	web/template/pkg_comment_form.php
	web/template/pkg_comments.php
	web/template/pkg_details.php
	web/template/pkg_search_results.php
	web/template/tu_details.php
2012-07-14 22:52:04 +02:00
canyonknight
c1bb1df2b3 acctfuncs.inc.php: Move XHTML to account_details.php template
XHTML should be eliminated from lib/ as much as possible. This pulls the XHTML
out of the display_account_info function that echoes the code, and moves it
to the new account_details.php template file.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:27:16 +02:00
canyonknight
8a59cd6208 account.php: Pull out DB code
* Move DB code in account.php to new functions in  acctfuncs.inc.php
* Centralization of DB code important in a future transition to PDO interface
* Consolidate redudant SQL statements from DisplayAccount and AccountInfo
* Consolidation also adds ability to edit accounts based on username

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:27:03 +02:00
canyonknight
13b892e923 Overhaul account pages to match archweb
* Use CSS from archweb
* General clean-up of XHTML formatting

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-07-06 11:26:30 +02:00
Lukas Fleischer
f90d569376 Remove all traces of "pgboxtitle"
Using a div container to format heading is ridiculous. Use "<h2></h2>"
instead.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:25:58 +02:00
canyonknight
2c93f0a98f Implement token system to fix CSRF vulnerabilities
Specially crafted pages can force authenticated users to unknowingly perform
actions on the AUR website despite being on an attacker's website. This
cross-site request forgery (CSRF) vulnerability applies to all POST data on
the AUR.

Implement a token system using a double submit cookie. Have a hidden form
value on every page containing POST forms. Use the newly added check_token() to
verify the token sent via POST matches the "AURSID" cookie value. Random
nature of the token limits potential for CSRF.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-06-24 10:59:23 +02:00
Lukas Fleischer
e9d8e9b8c0 Support canonical links to accounts
Addresses FS#9582 and FS#21600.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-03-24 10:34:35 +01:00
Lukas Fleischer
985795a210 Add field for PGP key in profile information
This is handy for verifying the PGP key of new Trusted Users. Also, this
could potentially used as a basis to allow signed package uploads in the
future.

Implements FS#29028.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-03-24 10:34:32 +01:00
Lukas Fleischer
10b6a8fff7 Wrap mysql_real_escape_string() in a function
Wrap mysql_real_escape_string() in a wrapper function db_escape_string()
to ease porting to other databases, and as another step to pulling more
of the database code into a central location.

This is a rebased version of a patch by elij submitted about half a year
ago.

Thanks-to: elij <elij.mx@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>

Conflicts:

	web/lib/aur.inc.php
2011-10-25 09:25:30 +02:00
Lukas Fleischer
323d418f02 Wrap mysql_real_escape_string() in a function
Wrap mysql_real_escape_string() in a wrapper function db_escape_string()
to ease porting to other databases, and as another step to pulling more
of the database code into a central location.

This is a rebased version of a patch by elij submitted about half a year
ago.

Thanks-to: elij <elij.mx@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:54 +02:00
Dan McGee
c7a9c2f3d3 Show last voted date on account details page
We already show it in the account listing page as well, so we should
show it here too.

Also use a standard date format; we weren't using this non-punctuated
format anywhere else.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-10-24 17:57:53 +02:00
elij
888db089c5 rename *.inc files to *.inc.php and adjust imports and references
Lukas: Add note to "UPGRADING".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-22 15:15:04 +02:00
Lukas Fleischer
eef5353bde Remove "New Package Notify" option from user account settings.
Do this in preparation for the upcoming notification script removal.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-13 12:22:28 +02:00
Dan McGee
cdc01130cf Fix PHP notices in account pages
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:17 +01: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
2ee3276348 Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 16:29:45 -05: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
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
Loui Chang
a5a8895f49 Put login into its own function.
Utilise login form template.
Also cleaned up a couple notices.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-23 03:04:16 -05:00
Callan Barrett
379e16eebd Support for verbose page titles
Verbose page titles again

Adds support for more verbose page titles based on current
page and action by user and removes sort by options from
search form as they're obsolete by column links.

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-01-20 00:21:20 -06:00
tardo
881b921eb3 Fixed version strings.
Added AUR_VERSION to config file, so now we should only need to
change one location. KISS ftw.

Signed-off-by: tardo <tardo@nagi-fanboi.net>
2007-10-02 07:29:27 -04:00
eliott
aebdd21b58 More changes to page styles. 2007-09-24 07:57:35 -07:00
pjmattal
452d6b1245 patch from eliott to convert all <? to <?php 2007-09-20 21:46:43 +00:00
swiergot
0b92839bee - Applied a patch from Loui to fix session removal.
- Replaced all occurences of mysql_escape_string()
  with mysql_real_escape_string().
2007-09-20 15:33:04 +00:00
pjmattal
c3a90420e2 added dsa's header include patch 2006-08-08 00:59:10 +00:00
pjmattal
ce505210fa added dsa's "My Packages" patch 2006-08-01 05:50:48 +00:00
pjmattal
c7e4f5c7fa Added Simo's patch for #2579, adding user info page
also modified it slightly so that we no longer look at AURMaintainerUID for maintainer
2005-06-10 04:52:46 +00:00
simo
f6ea024640 Fix user existence checks; whacks bug#2585 2005-04-23 16:48:37 +00:00
eric
a54ca6bfaf started working on package delete support 2005-01-25 22:52:32 +00:00
eric
74d81b288d continuing with pkgsubmit, added vim instructions to php files 2004-09-10 12:47:37 +00:00
eric
1f62f86af5 getting closer to printing package search results - also fixed some XHTML stuff 2004-06-24 19:08:35 +00:00
eric
84912ddb2e account adding/editing is working 2004-06-23 00:28:13 +00:00
eric
64db123697 pulled out account functions into separate include file 2004-06-22 14:26:54 +00:00
eric
38eda65735 working on the accounts stuff 2004-06-21 19:36:54 +00:00
eric
84e15d0463 finished the login/logout/session stuff 2004-06-20 23:26:28 +00:00
eric
22e8556691 finished tweaking language selection 2004-06-19 14:36:22 +00:00