~ubuntu-branches/ubuntu/edgy/bugzilla/edgy

« back to all changes in this revision

Viewing changes to debian/patches/05_webpath.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Alexis Sukrieh
  • Date: 2005-10-03 16:51:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051003165101-38n0y5qofd68vole
Tags: 2.18.4-1
* New upstream minor release
  + Fixed a security issue: It was possible to bypass the "user
    visibility groups" restrictions if user-matching was turned on
    in "substring" mode.
  + Fixed a security issue: config.cgi exposed information to users who
    weren't logged in, even when "requirelogin" was turned on in Bugzilla.
  (closes: #331206)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 05_webpath.dpatch by  <alexis@sitadelle.com>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Upstream patch: #280180 - Templates should provide a [% webpath %] token for a non standalone Bugzilla websites.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad ./Bugzilla/Config.pm /tmp/dpep-work.6epPdO/bugzilla-2.18/Bugzilla/Config.pm
 
9
--- ./Bugzilla/Config.pm        2005-04-27 14:54:26.846604096 +0200
 
10
+++ /tmp/dpep-work.6epPdO/bugzilla-2.18/Bugzilla/Config.pm      2005-04-27 14:54:37.515982104 +0200
 
11
@@ -78,10 +78,14 @@
 
12
 # Bugzilla version
 
13
 $Bugzilla::Config::VERSION = "2.18";
 
14
 
 
15
+
 
16
 use Safe;
 
17
 
 
18
 use vars qw(@param_list);
 
19
 
 
20
+# This is for Debian compat, in order to be able to use [% webpath %] in templates.
 
21
+our $WEBPATH = "/bugzilla/";
 
22
+
 
23
 # Data::Dumper is required as needed, below. The problem is that then when
 
24
 # the code locally sets $Data::Dumper::Foo, this triggers 'used only once'
 
25
 # warnings.
 
26
@@ -127,7 +131,7 @@
 
27
 _load_datafiles();
 
28
 
 
29
 # Load in the param defintions
 
30
-unless (my $ret = do 'defparams.pl') {
 
31
+unless (my $ret = do '/usr/share/bugzilla/defparams.pl') {
 
32
     die "Couldn't parse defparams.pl: $@" if $@;
 
33
     die "Couldn't do defparams.pl: $!" unless defined $ret;
 
34
     die "Couldn't run defparams.pl" unless $ret;
 
35
diff -urNad ./Bugzilla/Template.pm /tmp/dpep-work.6epPdO/bugzilla-2.18/Bugzilla/Template.pm
 
36
--- ./Bugzilla/Template.pm      2005-04-27 14:41:13.000000000 +0200
 
37
+++ /tmp/dpep-work.6epPdO/bugzilla-2.18/Bugzilla/Template.pm    2005-04-27 14:54:37.516981952 +0200
 
38
@@ -380,6 +380,9 @@
 
39
             # Bugzilla version
 
40
             # This could be made a ref, or even a CONSTANT with TT2.08
 
41
             'VERSION' => $Bugzilla::Config::VERSION ,
 
42
+
 
43
+           # This is for Debian compat, in order to be able to use [% webpath %] in templates.
 
44
+           'webpath' => $Bugzilla::Config::WEBPATH,
 
45
         },
 
46
 
 
47
    }) || die("Template creation failed: " . $class->error());
 
48
diff -urNad ./template/en/default/global/header.html.tmpl /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/global/header.html.tmpl
 
49
--- ./template/en/default/global/header.html.tmpl       2005-04-27 14:41:14.000000000 +0200
 
50
+++ /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/global/header.html.tmpl     2005-04-27 14:54:37.517981800 +0200
 
51
@@ -74,7 +74,7 @@
 
52
 
 
53
     [%+ INCLUDE "global/help-header.html.tmpl" %]
 
54
 
 
55
-    <link href="css/global.css" rel="stylesheet" type="text/css">
 
56
+    <link href="[% webpath %]css/global.css" rel="stylesheet" type="text/css">
 
57
 
 
58
     [% IF style %]
 
59
       <style type="text/css">
 
60
@@ -84,7 +84,7 @@
 
61
 
 
62
     [% IF style_urls %]
 
63
       [% FOREACH style_url = style_urls %]
 
64
-        <link href="[% style_url %]" rel="stylesheet" type="text/css">
 
65
+        <link href="[% webpath %][% style_url %]" rel="stylesheet" type="text/css">
 
66
       [% END %]
 
67
     [% END %]
 
68
 
 
69
diff -urNad ./template/en/default/index.html.tmpl /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/index.html.tmpl
 
70
--- ./template/en/default/index.html.tmpl       2005-04-27 14:41:13.000000000 +0200
 
71
+++ /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/index.html.tmpl     2005-04-27 14:54:37.516981952 +0200
 
72
@@ -86,11 +86,11 @@
 
73
   </p>
 
74
   </form>
 
75
  </td>
 
76
- <td align="right"><img src="ant.jpg" width="329" height="220" border="2" alt="ant.jpg [8.5k]"></td>
 
77
+ <td align="right"><img src="[% webpath %]ant.jpg" width="329" height="220" border="2" alt="ant.jpg [8.5k]"></td>
 
78
 </tr></table>
 
79
 
 
80
-<script type="text/javascript" language="JavaScript" src="localconfig.js"></script>
 
81
-<script type="text/javascript" language="JavaScript" src="quicksearch.js"></script>
 
82
+<script type="text/javascript" language="JavaScript" src="[% webpath %]localconfig.js"></script>
 
83
+<script type="text/javascript" language="JavaScript" src="[% webpath %]quicksearch.js"></script>
 
84
 <script type="text/javascript">
 
85
 <!--
 
86
 document.forms['f'].id.focus();
 
87
diff -urNad ./template/en/default/sidebar.xul.tmpl /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/sidebar.xul.tmpl
 
88
--- ./template/en/default/sidebar.xul.tmpl      2005-04-27 14:41:13.000000000 +0200
 
89
+++ /tmp/dpep-work.6epPdO/bugzilla-2.18/template/en/default/sidebar.xul.tmpl    2005-04-27 14:54:37.517981800 +0200
 
90
@@ -35,8 +35,8 @@
 
91
   onload="document.getElementById('query-field').addEventListener('keypress', initial_keypress_handler, true)">
 
92
 
 
93
 <!-- Load QuickSearch libraries -->
 
94
-<script type="application/x-javascript" src="localconfig.js"/>
 
95
-<script type="application/x-javascript" src="quicksearch.js"/>
 
96
+<script type="application/x-javascript" src="[% webpath %]localconfig.js"/>
 
97
+<script type="application/x-javascript" src="[% webpath %]quicksearch.js"/>
 
98
 <script type="application/x-javascript"><![CDATA[
 
99
 
 
100
 // Tell QuickSearch that the source of this is the sidebar