Closed Bug 768529 Opened 12 years ago Closed 12 years ago

SMS: Whitelist URI checking should use nsContentUtils::URIIsChromeOrInPref

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
trivial

Tracking

()

RESOLVED WONTFIX

People

(Reporter: marshall, Unassigned)

Details

There is a chunk of code in the SMS whitelist check that should be removed in favor of nsContentUtils::URLIsChromeOrInPref:

>  nsCAutoString uriPrePath;
>  uri->GetPrePath(uriPrePath);
>
>  const nsAdoptingString& whitelist =
>    Preferences::GetString("dom.sms.whitelist");
>
>  nsCharSeparatedTokenizer tokenizer(whitelist, ',',
>                                       nsCharSeparatedTokenizerTemplate<>::SEPARATOR_OPTIONAL);

>  while (tokenizer.hasMoreTokens()) {
>    const nsSubstring& whitelistItem = tokenizer.nextToken();
>
>    if (NS_ConvertUTF16toUTF8(whitelistItem).Equals(uriPrePath)) {
>      return true;
>    }
>  }
>
>  // The current page hasn't been whitelisted.
>  return false;
Aren't we moving on to permission manager based API in bug 707659?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.