[tor-bugs] #6708 [Onionoo]: Pyonionoo returns code 500 for a few parameters

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Sep 22 23:22:52 UTC 2012


#6708: Pyonionoo returns code 500 for a few parameters
---------------------+------------------------------------------------------
 Reporter:  karsten  |          Owner:  gsathya       
     Type:  defect   |         Status:  needs_revision
 Priority:  normal   |      Milestone:                
Component:  Onionoo  |        Version:                
 Keywords:           |         Parent:                
   Points:           |   Actualpoints:                
---------------------+------------------------------------------------------
Changes (by karsten):

  * status:  needs_review => needs_revision


Comment:

 Commits eaefe79..fdcf519 look good, but I'm not happy with 92dac32.
 Several reasons:

  - Multiple search terms separated by spaces are not supported.

  - Searching by fingerprint or nickname works for partial search terms,
 but searching for partial IP addresses does not work.

  - Some specific search terms can be fingerprint parts or nickname
 (parts), e.g., `"cafe"`, but 92dac32 would in that case only search by
 fingerprint.

  - Searches don't include hashed fingerprints.  That is, if a fingerprint
 has (full) fingerprint `fpr`, it should also be included in the details if
 the search is for `SHA1(fpr)`.  The idea is to have applications hash all
 full fingerprints they receive from the user and thereby avoid
 transmitting non-hashed bridge fingerprints to Onionoo/Pyonionoo.

  - Pyonionoo shouldn't copy code from stem, but rather include stem as a
 library.  Pyonionoo will need more stem functionality for the back-end
 part anyway.

 Anyway, I wonder if there's an easier way to implement searching in
 Pyonionoo: we could simply add a new search column to the SQLite database
 that contains the fingerprint, hashed fingerprint, nickname, and addresses
 in a single text field, separated by spaces.  For example, gabelmoo would
 have `" f2044413dac2e02e3d6bcf4735a19bca1de97281
 16ef359c2fbf50fc08cf9a95717be3060575b67e gabelmoo 212.112.245.170"` as its
 search value (note that everything's lower-case, and note the leading
 space).  Searches would then add a `WHERE` clause for each search term,
 e.g., `"WHERE search LIKE '% gab%' AND search LIKE '% 212.112.%'"` (again,
 note that all search terms need to be lower-cased, and note the leading
 spaces).

 Merging eaefe79..fdcf519 now, and changing to needs_revision for 92dac32.
 Thanks!

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6708#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list