Strict=True Returns "amazonaws.com" as an eTLD

Open
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
networking

Research direction

Start by running the reproduction script from the issue and confirming what PublicSuffixList.get_public_suffix returns with strict=True. Read the implementation of PublicSuffixList and its strict matching behavior, then add or update a test for snack.amazonaws.com. Done means the strict=True result is amazonaws.com without breaking existing public suffix behavior.

Written by the indexing model from the issue text.

Description

The following code:

from publicsuffix2 import PublicSuffixList

psl = PublicSuffixList(idna=True)
print(psl.get_public_suffix('snack.amazonaws.com',strict=True))

returns snack.amazonaws.com when it should return amazonaws.com.

Dominant language
Python
Stars
31
Forks
16
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aboutcode-org/python-publicsuffix2

All issues in aboutcode-org/python-publicsuffix2

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.