Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 519202 | Differences between
and this patch

Collapse All | Expand All

(-)subversion/libsvn_subr/config_auth.c (+7 lines)
Lines 90-95 svn_config_read_auth_data(apr_hash_t **hash, Link Here
90
  if (kind == svn_node_file)
90
  if (kind == svn_node_file)
91
    {
91
    {
92
      svn_stream_t *stream;
92
      svn_stream_t *stream;
93
      svn_string_t *stored_realm;
93
      SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
94
      SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
94
                _("Unable to open auth file for reading"));
95
                _("Unable to open auth file for reading"));
Lines 100-105 svn_config_read_auth_data(apr_hash_t **hash, Link Here
100
                apr_psprintf(pool, _("Error parsing '%s'"),
101
                apr_psprintf(pool, _("Error parsing '%s'"),
101
                             svn_dirent_local_style(auth_path, pool)));
102
                             svn_dirent_local_style(auth_path, pool)));
103
      stored_realm = apr_hash_get(*hash, SVN_CONFIG_REALMSTRING_KEY,
104
                                  APR_HASH_KEY_STRING);
105
106
      if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0)
107
        *hash = NULL; /* Hash collision, or somebody tampering with storage */
108
102
      SVN_ERR(svn_stream_close(stream));
109
      SVN_ERR(svn_stream_close(stream));
103
    }
110
    }
104
 Patch against 1.8.9:
111
 Patch against 1.8.9:
(-)subversion/libsvn_subr/config_auth.c (+6 lines)
Lines 94-99 svn_config_read_auth_data(apr_hash_t **hash, Link Here
94
  if (kind == svn_node_file)
94
  if (kind == svn_node_file)
95
    {
95
    {
96
      svn_stream_t *stream;
96
      svn_stream_t *stream;
97
      svn_string_t *stored_realm;
97
      SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
98
      SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool),
98
                _("Unable to open auth file for reading"));
99
                _("Unable to open auth file for reading"));
Lines 104-109 svn_config_read_auth_data(apr_hash_t **hash, Link Here
104
                apr_psprintf(pool, _("Error parsing '%s'"),
105
                apr_psprintf(pool, _("Error parsing '%s'"),
105
                             svn_dirent_local_style(auth_path, pool)));
106
                             svn_dirent_local_style(auth_path, pool)));
107
      stored_realm = svn_hash_gets(*hash, SVN_CONFIG_REALMSTRING_KEY);
108
109
      if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0)
110
        *hash = NULL; /* Hash collision, or somebody tampering with storage */
111
106
      SVN_ERR(svn_stream_close(stream));
112
      SVN_ERR(svn_stream_close(stream));
107
    }
113
    }

Return to bug 519202