sciunto-org / python-bibtexparser

Bibtex parser for Python 3
https://bibtexparser.readthedocs.io
MIT License
474 stars 132 forks source link

Cannot match if there is a space between `@inproceedings` and `{` #391

Closed am009 closed 1 year ago

am009 commented 1 year ago

for this bibtex copied from usenix website: (notice the space in @inproceedings {xxx)

@inproceedings {251572,
author = {Shravan Narayan and Craig Disselkoen and Tal Garfinkel and Nathan Froyd and Eric Rahm and Sorin Lerner and Hovav Shacham and Deian Stefan},
title = {Retrofitting Fine Grain Isolation in the Firefox Renderer},
booktitle = {29th USENIX Security Symposium (USENIX Security 20)},
year = {2020},
isbn = {978-1-939133-17-5},
pages = {699--716},
url = {https://www.usenix.org/conference/usenixsecurity20/presentation/narayan},
publisher = {USENIX Association},
month = aug,
abstract = {Firefox and other major browsers rely on dozens of third-party libraries to render audio, video, images, and other content. These libraries are a frequent source of vulnerabilities. To mitigate this threat, we are migrating Firefox to an architecture that isolates these libraries in lightweight sandboxes, dramatically reducing the impact of a compromise. Retrofitting isolation can be labor-intensive, very prone to security bugs, and requires critical attention to performance. To help, we developed RLBox, a framework that minimizes the burden of converting Firefox to securely and efficiently use untrusted code. To enable this, RLBox employs static information flow enforcement, and lightweight dynamic checks, expressed directly in the C++ type system. RLBox supports efficient sandboxing through either software-based-fault isolation or multi-core process isolation. Performance overheads are modest and transient, and have only minor impact on page latency. We demonstrate this by sandboxing performance-sensitive image decoding libraries (libjpeg and libpng), video decoding libraries (libtheora and libvpx), the libvorbis audio decoding library, and the zlib decompression library. RLBox, using a WebAssembly sandbox, has been integrated into production Firefox to sandbox the libGraphite font shaping library.}
}

Everything becomes ImplicitComment.

image

I don't know if this is expected, but there is also no warning or error reported.

MiWeiss commented 1 year ago

Successfully reproduced. Thanks for opening the issue :+1:

I am not completely sure if this is valid bibtex or not, but either way implicit comment appears to be the wrong block type. I am working on a PR to handle non-linebreaking whitepace at that location. Expect it to be a pretty easy fix, but well see ;-)