[prev in list] [next in list] [prev in thread] [next in thread]
List: serusers
Subject: Re: [Serusers] Mysql Problem
From: "=?UTF-8?Q?Victor_Pascual_=C3=81vila?=" <victor.pascual.avila () gmail ! com>
Date: 2008-05-22 20:31:24
Message-ID: 618e24240805221331s7a6d0696kbd92b8a2b7c7d3cb () mail ! gmail ! com
[Download RAW message or body]
Hi,
On Thu, May 22, 2008 at 10:17 PM, vijay tiwari <vijay11tiwari@yahoo.com> wrote:
> problem is when i am putting any other user and password which is not in
> the database that also got register. so it is normal?
Please, check if you allow only authenticated users to be registered.
Source: http://www.iptel.org/file_standard
route[REGISTRAR]
{
# if the request is a REGISTER lets take care of it
if (method=="REGISTER") {
# check if the REGISTER if for one of our local domains
if (!$t.did) {
sl_reply("403", "Register forwarding forbidden");
drop;
}
# we want only authenticated users to be registered
if (!www_authenticate("$fd.digest_realm", "credentials")) {
if ($? == -2) {
sl_reply("500", "Internal Server Error");
} else if ($? == -3) {
sl_reply("400", "Bad Request");
} else {
if ($digest_challenge) {
append_to_reply("%$digest_challenge");
}
sl_reply("401", "Unauthorized");
}
drop;
}
# check if the authenticated user is the same as the target user
if (!lookup_user("$tu.uid", "@to.uri")) {
sl_reply("404", "Unknown user in To");
drop;
}
if ($f.uid != $t.uid) {
sl_reply("403", "Authentication and To-Header mismatch");
drop;
}
# check if the authenticated user is the same as the request originator
# you may uncomment it if you care, what uri is in From header
#if (!lookup_user("$fu.uid", "@from.uri")) {
# sl_reply("404", "Unknown user in From");
# drop;
#}
#if ($fu.uid != $tu.uid) {
# sl_reply("403", "Authentication and From-Header mismatch");
# drop;
#}
# everyhting is fine so lets store the binding
if (!save_contacts("location")) {
sl_reply("400", "Invalid REGISTER Request");
drop;
}
drop;
}
}
Cheers,
--
Victor Pascual Ávila
_______________________________________________
Serusers mailing list
Serusers@lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic