Repository navigation
Fix: Refuse a Kaggle notebook owner that is an email address - #102
Merged
Merged
Conversation
Notebook deletes answered 403 because the account's username file held the owner's email address, so kernels delete named a notebook that does not exist. Login now refuses an owner containing @, whitespace or a slash, open_channel refuses a stored one with the fix command, and the 403 delete warning names the owner rule instead of blaming the token's permissions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notebook deletes failed with 403 on
DeleteKernelbecause the account'susernamefile held the owner's email address.kaggle kernels delete -y <email>/<slug>names a notebook that does not exist, and Kaggle answers 403. With the real username the same token deleted all three notebooks (measured live on 2026-11-08). PR #101 wrongly blamed the token's permissions.Changes:
letify login kagglerefuses an owner containing@, whitespace or/, naming the profile URL kaggle.com/. Nothing is written.open_channelrefuses a stored owner of that shape before any notebook is created, withletify login kaggle <alias> --replace --username <username>(blank answers keep the cookie and token).<owner>/<slug>, that the owner must be the username and not an email, and the same fix command. The token-permission sentence is gone from code and spec.Tests (written first, red before the fix: 5 failed, then green): login refuses an email, spaced or slashed owner and writes nothing; a stored email owner is refused before any notebook; the 403 warning names the owner rule. tests/test_kaggle*.py and tests/test_tunnel_agent_login.py: 161 passed. Tests matching login: 63 passed, 1 skipped. ruff check letify tests: clean.