Giter Club home page Giter Club logo

Comments (8)

h3xagonal avatar h3xagonal commented on August 18, 2024

Correcting for this issue would be trivial. But does the upstream project want to have this particular condition handled?

Thank you

from nyx.

atagar avatar atagar commented on August 18, 2024

I'd be delighted to merge a patch if it's correct. On first glance nyx's split() call should be fine with tabs...

>>> "hello world".split()
['hello', 'world']

>>> "hello\tworld".split()
['hello', 'world']

from nyx.

h3xagonal avatar h3xagonal commented on August 18, 2024

May have been too hasty in pinning it as the wrong delimiter with string-splitting. That is not the issue.

It appears when nyx retrieves the log path using the stem library functions get_conf/get_conf_map the value gets mangled when tab-delimited in torrc

notice\\tfile\\t/var/log/tor

This is why splitting of the tokens fail.

Raw ControlPort access with the GETCONF command shows the response is normally escaped so I suspect the issue involves string handling when the response is already escaped.

Thank you

from nyx.

atagar avatar atagar commented on August 18, 2024

Thanks, makes sense. I'd be delighted to merge a patch that addresses it.

from nyx.

h3xagonal avatar h3xagonal commented on August 18, 2024

Did some more tracing.

When the message is received by stem the string-formatting of Python double-escapes any escaped tabs in the response so the issue probably could be fixed by un-escaping the value. The question is if to fix it when retrieving the log path or globally for all messages received using stem. Only caveat with suggesting the latter is that the concern with unforeseen breakage exists.

Thank you.

from nyx.

atagar avatar atagar commented on August 18, 2024

Thanks h3xagonal! Sorry for the long delay.

Performing the conversion within nyx is a bit of a hack but I merged this because...

  1. Your patch will certainly do the trick.
  2. The proper solution would be to look into tor's codebase, see how it handles tabs, if it changed recently, then either adjust tor or normalize in stem's get_conf_map.

I no longer work with tor so opting for the simple approach and merged this. ;)

from nyx.

h3xagonal avatar h3xagonal commented on August 18, 2024

Happy to have provided assistance.

I no longer work with tor so opting for the simple approach and merged this. ;)

Off-topic question but is the status of nyx unmaintained or will others be able to merge pull-requests for correction of issues or new features and issue new releases?

Good luck to other ventures.

Thank you.

from nyx.

atagar avatar atagar commented on August 18, 2024

is the status of nyx unmaintained or will others be able to merge pull-requests for correction of issues or new features and issue new releases?

I continue to merge pull requests for Nyx and Stem but my chief reason for leaving tor was their disinterest in my projects so nope, further releases aren't presently in the cards. Sorry to disappoint.

from nyx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.