Concrete5 5.6.3.4用户以错误用户身份登录

时间:2016-07-12 21:06:17

标签: authentication hash login session-cookies concrete5

我们网站的用户神秘地以不同的用户身份登录时遇到了间歇性问题。该站点建立在Concrete5 Version 5.6.3.4之上。这似乎是一个巨大的安全漏洞,因为我们正在显示私人和敏感数据,并允许现场购买信用卡。

1 个答案:

答案 0 :(得分:0)

该网站永远实现了cookie,这似乎导致了这个问题。根据{{​​3}},用于cookie的哈希的冲突率约为8%。该页面链接中的补丁似乎可以缓解问题,但不能完全消除它。

第二个补丁尝试将用户ID添加到标识符,以使其唯一并消除该碰撞风险。好像它应该是:

df = pd.DataFrame([["0,1", "10", "10,300"], ["1", "5", "300,0"], ["10,1,0", "", "300,10"]], columns = ["x", "y", "z"])

bin_dict_x = {'0': 100, '1': 10, '10': 1}
bin_dict_y = {'5': 10, '10': 1}
bin_dict_z = {'0': 100, '10': 10, '300': 1}

def to_bin(dct, entry):
    out = 0
    for i in entry.split(','):
       if len(i) > 0:
           out+= dct[i]  
    return str(out).zfill(len(dct))

df['x_bin'] = df.apply(lambda x: to_bin(bin_dict_x, x['x']), axis = 1)
df['y_bin'] = df.apply(lambda x: to_bin(bin_dict_y, x['y']), axis = 1)
df['z_bin'] = df.apply(lambda x: to_bin(bin_dict_y, x['z']), axis = 1)

df[['x_bin','y_bin','z_bin']]

  x_bin y_bin z_bin
0   110    01   011
1   010    10   101
2   111    00   011
相关问题