From fedora-directory-commits at redhat.com Mon Mar 3 17:59:47 2008
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Mon, 3 Mar 2008 12:59:47 -0500
Subject: [Fedora-directory-commits] adminutil/lib/libadminutil form_post.c,
1.8, 1.9
Message-ID: <200803031759.m23Hxl3E002515@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/adminutil/lib/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2494/adminutil/lib/libadminutil
Modified Files:
form_post.c
Log Message:
Resolves: bug 245248
Description: dsgw doesn't escape filename in error message
Reviewed by: nhosoi (Thanks!)
Fix Description: Do 2 passes on the input form data. In the first pass,
convert hex escapes (%xx) to the actual char. In the second pass, if the
char is one of the characters we must escape, convert to the html escape
form (e.g. '&' to "&") then write to output string. This way we can
catch cases where "%xx" evaluates to '&' for example.
Platforms tested: RHEL5 x86_64
Flag day: no
Doc: no
Index: form_post.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/form_post.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- form_post.c 21 Jun 2007 22:32:24 -0000 1.8
+++ form_post.c 3 Mar 2008 17:59:45 -0000 1.9
@@ -140,6 +140,10 @@
}
for (x = 0, y = 0; x < l; x++, y++) {
+ /* first, do the url unescaping, if needed -
+ digit holds the candidate char to write
+ to the output string
+ */
if (('%' == str[x]) && (x < (l - 2))) {
++x;
digit = (str[x] >= 'A' ?
@@ -149,27 +153,31 @@
++x;
digit += (str[x] >= 'A' ?
((str[x] & 0xdf) - 'A') + 10 : (str[x] - '0'));
-
- rstr[y] = digit;
} else if (str[x] == '+') {
- rstr[y] = ' ';
- } else if ('<' == str[x]) {
+ digit = ' ';
+ } else {
+ digit = str[x];
+ }
+
+ /* next, see if digit (the original or the unescaped char)
+ needs to be html encoded */
+ if ('<' == digit) {
memcpy(&rstr[y], "<", 4);
y += 3;
- } else if ('>' == str[x]) {
+ } else if ('>' == digit) {
memcpy(&rstr[y], ">", 4);
y += 3;
- } else if ('&' == str[x]) {
+ } else if ('&' == digit) {
memcpy(&rstr[y], "&", 5);
y += 4;
- } else if ('"' == str[x]) {
+ } else if ('"' == digit) {
memcpy(&rstr[y], """, 6);
y += 5;
- } else if ('\'' == str[x]) {
+ } else if ('\'' == digit) {
memcpy(&rstr[y], "'", 5);
y += 4;
- } else {
- rstr[y] = str[x];
+ } else { /* just write the char to the output string */
+ rstr[y] = digit;
}
}
rstr[y] = '\0';
@@ -327,7 +335,7 @@
char *ans = NULL;
char buf[BUFSIZ];
- while(input[x]) {
+ while(input && input[x]) {
/* We want to get rid of the =, so len, len+1 */
if((!strncmp(input[x], varname, len)) && (*(input[x]+len) == '=')) {
if (!(ans = PL_strdup(input[x] + len + 1))) {
From fedora-directory-commits at redhat.com Mon Mar 3 18:07:09 2008
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Mon, 3 Mar 2008 13:07:09 -0500
Subject: [Fedora-directory-commits] adminutil configure.ac, 1.10,
1.11 aclocal.m4, 1.13, 1.14 configure, 1.13, 1.14 missing,
1.12, 1.13 install-sh, 1.12, 1.13 Makefile.in, 1.13,
1.14 depcomp, 1.12, 1.13 config.sub, 1.12, 1.13 config.guess,
1.12, 1.13 compile, 1.12, 1.13
Message-ID: <200803031807.m23I798h010170@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/adminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10139
Modified Files:
configure.ac aclocal.m4 configure missing install-sh
Makefile.in depcomp config.sub config.guess compile
Log Message:
bump version to 1.1.6
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/adminutil/configure.ac,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- configure.ac 11 Oct 2007 02:56:30 -0000 1.10
+++ configure.ac 3 Mar 2008 18:07:06 -0000 1.11
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([adminutil], [1.1.5], [http://bugzilla.redhat.com/])
+AC_INIT([adminutil], [1.1.6], [http://bugzilla.redhat.com/])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
Index: configure
===================================================================
RCS file: /cvs/dirsec/adminutil/configure,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- configure 11 Oct 2007 02:56:30 -0000 1.13
+++ configure 3 Mar 2008 18:07:06 -0000 1.14
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for adminutil 1.1.5.
+# Generated by GNU Autoconf 2.59 for adminutil 1.1.6.
#
# Report bugs to
+ | |
Person Entry |
+ |
- + | @@ -150,17 +152,17 @@ class="linknodec"> - org chart + org chart - vCard -onMouseOver="top.status='Retrieve this person\'s security certificate.'; return true"> Get Certificate +onMouseOver="top.status='Retrieve this person\'s security certificate.'; return true"> Get Certificate | @@ -188,7 +190,7 @@
-
+
|