使用 OCI_ATTR_PASSWORD 向 OCIAttrSet 提供密码时是否区分大小写?
在 (c++) OCI 程序的片段中,我将 OCIAttrSet
与 OCI_ATTR_PASSWORD
标志一起使用,以便传递(或设置)密码来初始化会话,如下所示
success = OCIAttrSet (
ses,
OCI_HTYPE_SESSION,
(text *) password.c_str(),
password.length(),
OCI_ATTR_PASSWORD,
err
);
: 后续
success = OCISessionBegin (
svc,
err,
ses,
OCI_CRED_RDBMS,
OCI_DEFAULT
);
如果密码以小写字母给出,则 工作正常。如果 password
中至少有一个字符为大写,OCISessionBegin
将返回错误 ORA-01017: invalid username/password;登录被拒绝
。
这种行为与我在 Oracle 中看到的所有密码处理形成鲜明对比,因为到目前为止我认为它们不区分大小写。然而,我没有在某处找到这种行为的记录。那么,这是预期的行为(并且我无法找到文档)还是有其他情况发生?
In a fragment of a (c++) OCI programm, I use OCIAttrSet
with the OCI_ATTR_PASSWORD
flag in order to pass (or set) the password to initialize a session like so:
success = OCIAttrSet (
ses,
OCI_HTYPE_SESSION,
(text *) password.c_str(),
password.length(),
OCI_ATTR_PASSWORD,
err
);
The subsequent
success = OCISessionBegin (
svc,
err,
ses,
OCI_CRED_RDBMS,
OCI_DEFAULT
);
works ok if the password is given in small letters. If at least one character of password
is in upper case, OCISessionBegin
return the error ORA-01017: invalid username/password; logon denied
.
This behaviour in contrast to every password handling I have seen in Oracle because up to now I believed them to be case insenstive. Yet, I don't find this behaviour documented somewhere. So, is this expected behaviour (and I am unable to find the documentation) or is there going on something else?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Oracle 用户密码不区分大小写,直到版本 11g - 现在您必须正确区分大小写。
Oracle user passwords were case-insensitive, until version 11g - now you have to get the case right.