Bugzilla – Attachment 42129 Details for
Bug 14764
Add OPAC News branch selector
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14764: OPAC news selector - URL parameter
Bug-14764-OPAC-news-selector---URL-parameter.patch (text/plain), 1.12 KB, created by
Martin Persson
on 2015-08-31 23:34:14 UTC
(
hide
)
Description:
Bug 14764: OPAC news selector - URL parameter
Filename:
MIME Type:
Creator:
Martin Persson
Created:
2015-08-31 23:34:14 UTC
Size:
1.12 KB
patch
obsolete
>From b500eb9eb67f782e178ee06863d97541e21ff3aa Mon Sep 17 00:00:00 2001 >From: Martin Persson <xarragon@gmail.com> >Date: Wed, 5 Aug 2015 16:16:50 +0200 >Subject: [PATCH] Bug 14764: OPAC news selector - URL parameter > >This patch adds an URL-based override for the homebranch >variable in opac-main.pl. Allows viewing of arbitrary branches. > >Possible security issue: The user changes branch parameter to >perform SQL or XSS injection. This would not be possible via >the database, as the foreign key constraint would block arbitrary >code. However, the News retrieval function is using prepared >statements which are immune to this. >--- > opac/opac-main.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index b0904c5..02d4de2 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -51,6 +51,9 @@ my $homebranch; > if (C4::Context->userenv) { > $homebranch = C4::Context->userenv->{'branch'}; > } >+if (defined $input->param('branch')) { >+ $homebranch = $input->param('branch'); >+} > my $all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); > my $koha_news_count = scalar @$all_koha_news; > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14764
:
42129
|
42130
|
42131
|
42132
|
42139
|
42146
|
42147
|
55679
|
55680
|
55681
|
55682
|
55724
|
55725
|
55726
|
56107
|
56108
|
56109
|
57058
|
57059
|
57060
|
57061
|
57062
|
57063
|
57110
|
59648
|
59653
|
59827
|
60396
|
60424
|
60425
|
60451
|
60452