Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Detect valid archives

Aberta
#96 3 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
32/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
backend

Direção de pesquisa

Start by reading how python-libarchive-c opens archives and handles libarchive warnings, then compare that behavior with the previous python-libarchive behavior described in the issue. Determine whether invalid archive input can be detected or surfaced as a catchable error; done means documenting or implementing a clear way to detect this case. The issue names no files or tests, so locate the relevant entry points and tests first.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

feature good first issue

I'm in the process of migrating from python2 using python-libarchive to python3 using python-libarchive-c. In all, the process has been quite easy (and many thanks to you folks for keeping a similar interface). However, I have run in to a bit of a snag.

I've been detecting whether or not a file is a legitimate archive based on trying to open it and detect errors. This works well for most files, but has been failing when I feed it something that looks like a /etc/passwd file. Previously, when libarchive returns Missing type keyword in mtree specification, the old python-libarchive would raise a ValueError. Now, this simply produces a Warning to the logger and the process continues.

Is there an easy way to make this produce an error that I can catch or otherwise detect invalid archives?

Linguagem predominante
Python
Estrelas
84
Forks
41
Merge médio
6d 12h
PRs com merge (30d)
1

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Changaco/python-libarchive-c

Todas as issues de Changaco/python-libarchive-c

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.