RSSBandit doesn't use credentials when replying to a
post.
The bug is actually in two places in the code (both
easily fixed):
1) PostCommentViaNntp in NntpParser gets passed a
ICredentials, but never users it. Something
like "request.Credentials = credentials" needs to be
added.
2) The PostComment method in NewsHandler requires the
code that looks for "nntp:" (or "news:") in the feed
link and then decides what to do to create the
redentials. I hacked my version of RSSBandit to do
the following:
public void PostComment(string url,
NewsItem item2post, NewsItem inReply2item){
if(inReply2item.CommentStyle
== SupportedCommentStyle.CommentAPI){
this.RssParser.PostCommentViaCommentAPI(url,
item2post, inReply2item, GetFeedCredentials
(inReply2item.Feed));
}else if
(inReply2item.CommentStyle ==
SupportedCommentStyle.NNTP){
ICredentials c = null;
if
(inReply2item.Feed.link.StartsWith("nntp:"))
{
Uri feedUri =
new Uri(inReply2item.Feed.link);
foreach
(NntpServerDefinition nsd in this.nntpServers.Values)
{
if
(nsd.Server.Equals(feedUri.Authority))
{
c = this.GetNntpServerCredentials(nsd.Name); break; } } } else { c =
GetFeedCredentials(inReply2item.Feed);
}
NntpParser.PostCommentViaNntp(item2post,
inReply2item, c);
}
}
This same saerch through the news groups happens
several different times for authentication -- seems
like a good candidate for refactoring.
Once I did this, I was able to send a post off to
the microsoft beta newsgropu reader! Sweet!
Logged In: YES
user_id=714452
Yet fixed a while ago, thanks!