• Redesigning NewsBlur on the web, iOS, and Android

    This past year we’ve focused on maintenance and improving quality behind the scenes. It just so happens that the urge to clean is so strong that this work extended to the front-end. After months of work, today we’re launching a redesigned NewsBlur for all three platforms: on the web, on iOS, and on Android. There’s a lot that’s new. And what better day to launch a redesign than on the ninth anniversary of the sunset of Google Reader.

    To start, let’s take a look below at the redesigned NewsBlur.

    Loads of new features:

    • The dashboard now has multiple, customizable rivers of news
    • Image previews are now customizable by size and layout
    • Story previews are also customizable by length
    • Images are now full bleed on the web (edge-to-edge)
    • Controls have been re-styled and made more accessible
    • Sizes, spaces, and text have all been tweaked for a more legible read
    • Upgraded backend: Python 2 to Python 3, latest Django and libraries, containerized infrastructure
    • Both Android and iOS apps have been updated with the new design

    Those multiple rivers come in handy when you want to follow different interests at a glance. You can of course change which individual feeds or folders is loaded, letting you focus on saved searches, infrequent stories, a single feed, or everything you’re subscribed to.

    Below you can see the design in action. Notice how easy it is to change where the image preview is located as well as adjust the number of lines of story text to show.

    The reading experience itself has also seen improvement. Full bleed images have been ported over from iOS to both Android and the web. This means that images will now run edge-to-edge. And the controls at the top and bottom of the web app have been restyled to be easier to understand at a quick glance.

    There’s many ways to adjust story titles to fit. Pack them in dense or offer titles room to breathe.

    The redesign has also come to both of the official Android and iOS apps. Right now both are in beta testing, but you can join the iOS TestFlight or the Android beta.

    This whole redesign weighs in at a whopping 1,316 commits, which you can view on GitHub. Much of the work that took place here involves upgrading from Python 2 to Python 3 and containerizing everything with Docker. In a few weeks, we’ll post a technical writeup of what those backend changes are and how you can now run a local version of NewsBlur on your own computer with a single line of code. For those that want to run their own private instance of NewsBlur, that line of code is make nb and instructions are found on the repo.

    If you’ve enjoyed using NewsBlur and are a fan of this grand redesign, please take a moment to share on social media that you read your news with the help of NewsBlur.

  • How a Docker footgun led to a vandal deleting NewsBlur's MongoDB database

    tl;dr: A vandal deleted NewsBlur’s MongoDB database during a migration. No data was stolen or lost.

    I’m in the process of moving everything on NewsBlur over to Docker containers in prep for a big redesign launching next week. It’s been a great year of maintenance and I’ve enjoyed the fruits of Ansible + Docker for NewsBlur’s 5 database servers (PostgreSQL, MongoDB, Redis, Elasticsearch, and soon ML models). The day was wrapping up and I settled into a new book on how to tame the machines once they’re smarter than us when I received a strange NewsBlur error on my phone.

    "query killed during yield: renamed collection 'newsblur.feed_icons' to 'newsblur.system.drop.1624498448i220t-1.feed_icons'"

    There is honestly no set of words in that error message that I ever want to see again. What is drop doing in that error message? Better go find out.

    Logging into the MongoDB machine to check out what state the DB is in and I come across the following…

    nbset:PRIMARY> show dbs
    newsblur                        0.718GB
    switched to db READ__ME_TO_RECOVER_YOUR_DATA
    nbset:PRIMARY> db.README.find()
        "_id" : ObjectId("60d3e112ac48d82047aab95d"), 
        "content" : "All your data is a backed up. You must pay 0.03 BTC to XXXXXXFTHISGUYXXXXXXX 48 hours for recover it. After 48 hours expiration we will leaked and exposed all your data. In case of refusal to pay, we will contact the General Data Protection Regulation, GDPR and notify them that you store user data in an open form and is not safe. Under the rules of the law, you face a heavy fine or arrest and your base dump will be dropped from our server! You can buy bitcoin here, does not take much time to buy https://localbitcoins.com or https://buy.moonpay.io/ After paying write to me in the mail with your DB IP: FTHISGUY@recoverme.one and you will receive a link to download your database dump." 

    Two thoughts immediately occured:

    1. Thank goodness I have some recently checked backups on hand
    2. No way they have that data without me noticing

    Three and a half hours before this happened, I switched the MongoDB cluster over to the new servers. When I did that, I shut down the original primary in order to delete it in a few days when all was well. And thank goodness I did that as it came in handy a few hours later. Knowing this, I realized that the hacker could not have taken all that data in so little time.

    With that in mind, I’d like to answer a few questions about what happened here.

    1. Was any data leaked during the hack? How do you know?
    2. How did NewsBlur’s MongoDB server get hacked?
    3. What will happen to ensure this doesn’t happen again?

    Let’s start by talking about the most important question of all which is what happened to your data.

    1. Was any data leaked during the hack? How do you know?

    I can definitively write that no data was leaked during the hack. I know this because of two different sets of logs showing that the automated attacker only issued deletion commands and did not transfer any data off of the MongoDB server.

    Below is a snapshot of the bandwidth of the db-mongo1 machine over 24 hours:

    You can imagine the stress I experienced in the forty minutes between 9:35p, when the hack began, and 10:15p, when the fresh backup snapshot was identified and put into gear. Let’s breakdown each moment:

    1. 6:10p: The new db-mongo1 server was put into rotation as the MongoDB primary server. This machine was the first of the new, soon-to-be private cloud.
    2. 9:35p: Three hours later an automated hacking attempt opened a connection to the db-mongo1 server and immediately dropped the database. Downtime ensued.
    3. 10:15p: Before the former primary server could be placed into rotation, a snapshot of the server was made to ensure the backup would not delete itself upon reconnection. This cost a few hours of downtime, but saved nearly 18 hours of a day’s data by not forcing me to go into the daily backup archive.
    4. 3:00a: Snapshot completes, replication from original primary server to new db-mongo1 begins. What you see in the next hour and a half is what the transfer of the DB looks like in terms of bandwidth.
    5. 4:30a: Replication, which is inbound from the old primary server, completes, and now replication begins outbound on the new secondaries. NewsBlur is now back up.

    The most important bit of information the above chart shows us is what a full database transfer looks like in terms of bandwidth. From 6p to 9:30p, the amount of data was the expected amount from a working primary server with multiple secondaries syncing to it. At 3a, you’ll see an enormous amount of data transfered.

    This tells us that the hacker was an automated digital vandal rather than a concerted hacking attempt. And if we were to pay the ransom, it wouldn’t do anything because the vandals don’t have the data and have nothing to release.

    We can also reason that the vandal was not able to access any files that were on the server outside of MongoDB due to using a recent version of MongoDB in a Docker container. Unless the attacker had access to a 0-day to both MongoDB and Docker, it is highly unlikely they were able to break out of the MongoDB server connection.

    While the server was being snapshot, I used that time to figure out how the hacker got in.

    2. How did NewsBlur’s MongoDB server get hacked?

    Turns out the ufw firewall I enabled and diligently kept on a strict allowlist with only my internal servers didn’t work on a new server because of Docker. When I containerized MongoDB, Docker helpfully inserted an allow rule into iptables, opening up MongoDB to the world. So while my firewall was “active”, doing a sudo iptables -L | grep 27017 showed that MongoDB was open the world. This has been a Docker footgun since 2014.

    To be honest, I’m a bit surprised it took over 3 hours from when I flipped the switch to when a hacker/vandal dropped NewsBlur’s MongoDB collections and pretended to ransom about 250GB of data. This is the work of an automated hack and one that I was prepared for. NewsBlur was back online a few hours later once the backups were restored and the Docker-made hole was patched.

    It would make for a much more dramatic read if I was hit through a vulnerability in Docker instead of a footgun. By having Docker silently override the firewall, Docker has made it easier for developers who want to open up ports on their containers at the expense of security. Better would be for Docker to issue a warning when it detects that the most popular firewall on Linux is active and filtering traffic to a port that Docker is about to open.

    The second reason we know that no data was taken comes from looking through the MongoDB access logs. With these rich and verbose logging sources we can invoke a pretty neat command to find everybody who is not one of the 100 known NewsBlur machines that has accessed MongoDB.

    $ cat /var/log/mongodb/mongod.log | egrep -v "159.65.XX.XX|161.89.XX.XX|<< SNIP: A hundred more servers >>"
    2021-06-24T01:33:45.531+0000 I NETWORK  [listener] connection accepted from #63455699 (1189 connections now open)
    2021-06-24T01:33:45.635+0000 I NETWORK  [conn63455699] received client metadata from conn63455699: { driver: { name: "PyMongo", version: "3.11.4" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "5.4.0-74-generic" }, platform: "CPython 3.8.5.final.0" }
    2021-06-24T01:33:46.010+0000 I NETWORK  [listener] connection accepted from #63455724 (1189 connections now open)
    2021-06-24T01:33:46.092+0000 I NETWORK  [conn63455724] received client metadata from conn63455724: { driver: { name: "PyMongo", version: "3.11.4" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "5.4.0-74-generic" }, platform: "CPython 3.8.5.final.0" }
    2021-06-24T01:33:46.500+0000 I NETWORK  [conn63455724] end connection (1198 connections now open)
    2021-06-24T01:33:46.533+0000 I NETWORK  [conn63455699] end connection (1200 connections now open)
    2021-06-24T01:34:06.533+0000 I NETWORK  [listener] connection accepted from #63456621 (1266 connections now open)
    2021-06-24T01:34:06.627+0000 I NETWORK  [conn63456621] received client metadata from conn63456621: { driver: { name: "PyMongo", version: "3.11.4" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "5.4.0-74-generic" }, platform: "CPython 3.8.5.final.0" }
    2021-06-24T01:34:06.890+0000 I NETWORK  [listener] connection accepted from #63456637 (1264 connections now open)
    2021-06-24T01:34:06.962+0000 I NETWORK  [conn63456637] received client metadata from conn63456637: { driver: { name: "PyMongo", version: "3.11.4" }, os: { type: "Linux", name: "Linux", architecture: "x86_64", version: "5.4.0-74-generic" }, platform: "CPython 3.8.5.final.0" }
    2021-06-24T01:34:08.018+0000 I COMMAND  [conn63456637] dropDatabase config - starting
    2021-06-24T01:34:08.018+0000 I COMMAND  [conn63456637] dropDatabase config - dropping 1 collections
    2021-06-24T01:34:08.018+0000 I COMMAND  [conn63456637] dropDatabase config - dropping collection: config.transactions
    2021-06-24T01:34:08.020+0000 I STORAGE  [conn63456637] dropCollection: config.transactions (no UUID) - renaming to drop-pending collection: config.system.drop.1624498448i1t-1.transactions with drop optime { ts: Timestamp(1624498448, 1), t: -1 }
    2021-06-24T01:34:08.029+0000 I REPL     [replication-14545] Completing collection drop for config.system.drop.1624498448i1t-1.transactions with drop optime { ts: Timestamp(1624498448, 1), t: -1 } (notification optime: { ts: Timestamp(1624498448, 1), t: -1 })
    2021-06-24T01:34:08.030+0000 I STORAGE  [replication-14545] Finishing collection drop for config.system.drop.1624498448i1t-1.transactions (no UUID).
    2021-06-24T01:34:08.030+0000 I COMMAND  [conn63456637] dropDatabase config - successfully dropped 1 collections (most recent drop optime: { ts: Timestamp(1624498448, 1), t: -1 }) after 7ms. dropping database
    2021-06-24T01:34:08.032+0000 I REPL     [replication-14546] Completing collection drop for config.system.drop.1624498448i1t-1.transactions with drop optime { ts: Timestamp(1624498448, 1), t: -1 } (notification optime: { ts: Timestamp(1624498448, 5), t: -1 })
    2021-06-24T01:34:08.041+0000 I COMMAND  [conn63456637] dropDatabase config - finished
    2021-06-24T01:34:08.398+0000 I COMMAND  [conn63456637] dropDatabase newsblur - starting
    2021-06-24T01:34:08.398+0000 I COMMAND  [conn63456637] dropDatabase newsblur - dropping 37 collections
    << SNIP: It goes on for a while... >>
    2021-06-24T01:35:18.840+0000 I COMMAND  [conn63456637] dropDatabase newsblur - finished

    The above is a lot, but the important bit of information to take from it is that by using a subtractive filter, capturing everything that doesn’t match a known IP, I was able to find the two connections that were made a few seconds apart. Both connections from these unknown IPs occured only moments before the database-wide deletion. By following the connection ID, it became easy to see the hacker come into the server only to delete it seconds later.

    Interestingly, when I visited the IP address of the two connections above, I found a Tor exit router:

    This means that it is virtually impossible to track down who is responsible due to the anonymity-preserving quality of Tor exit routers. Tor exit nodes have poor reputations due to the havoc they wreak. Site owners are split on whether to block Tor entirely, but some see the value of allowing anonymous traffic to hit their servers. In NewsBlur’s case, because NewsBlur is a home of free speech, allowing users in countries with censored news outlets to bypass restrictions and get access to the world at large, the continuing risk of supporting anonymous Internet traffic is worth the cost.

    3. What will happen to ensure this doesn’t happen again?

    Of course, being in support of free speech and providing enhanced ways to access speech comes at a cost. So for NewsBlur to continue serving traffic to all of its worldwide readers, several changes have to be made.

    The first change is the one that, ironically, we were in the process of moving to. A VPC, a virtual private cloud, keeps critical servers only accessible from others servers in a private network. But in moving to a private network, I need to migrate all of the data off of the publicly accessible machines. And this was the first step in that process.

    The second change is to use database user authentication on all of the databases. We had been relying on the firewall to provide protection against threats, but when the firewall silently failed, we were left exposed. Now who’s to say that this would have been caught if the firewall failed but authentication was in place. I suspect the password needs to be long enough to not be brute-forced, because eventually, knowing that an open but password protected DB is there, it could very possibly end up on a list.

    Lastly, a change needs to be made as to which database users have permission to drop the database. Most database users only need read and write privileges. The ideal would be a localhost-only user being allowed to perform potentially destructive actions. If a rogue database user starts deleting stories, it would get noticed a whole lot faster than a database being dropped all at once.

    But each of these is only one piece of a defense strategy. As this well-attended Hacker News thread from the day of the hack made clear, a proper defense strategy can never rely on only one well-setup layer. And for NewsBlur that layer was a allowlist-only firewall that worked perfectly up until it didn’t.

    As usual the real heros are backups. Regular, well-tested backups are a necessary component to any web service. And with that, I’ll prepare to launch the big NewsBlur redesign later this week.

  • Android app update: premium subscriptions, saved searches, in-app browser, auto-dark mode

    For a point release this one sure is big. The Android app has been upgraded to include a bunch of features found on the web.

    For one, premium subscriptions can now be purchased in the Android app itself. Reading by folder, saved story tags, searching and saved searches are all premium features that you can unlock directly in the app.

    Also, saved searches are now at the bottom of your feed list. Take a look:

    Heres’ the full list of version 10.1’s many new features:

    • Premium subscriptions are now available on Android! Read by folder, saved story tags, searching, and more is exclusive to premium subscribers.
    • Saved searches
    • In-app browser, so you don’t need to leave NewsBlur
    • Auto-theme option for dark mode so it can turn on automatically at night
    • You can now delete and rename folders and add a folder while adding a feed
    • Fixed issues around the intelligence trainer, HTML in comments, some images not loading

    If you would like to request a new feature on Android, please submit an idea on the NewsBlur Forum. We’re prioritizing the next big release and would love to hear your input.

  • Customizable grid view story layout

    The grid view has quickly become one of my go-to story title views. It provides generous, clickable boxes with enlarged images and plenty of preview text. But until now, they were limited to a preset height.

    Starting today, you can now change the height of stories in the grid view. You have five options to choose from: XS, Small, Medium, Large, and XL.

    Here are a few examples of how you can customize the grid view.

    With the single column layout:

    With the 2 column layout:

    With the 3 column layout:

    With the 4 column layout:

    Don’t forget you can also adjust the font size and even turn off image previews.

  • Highlight passages and add private notes to saved stories

    When you’re reading a story and want to save a portion of it for personal use, you now have a couple new options. Highlighting is now available for all stories. Simply select the text you want to highlight and NewsBlur helpfully shows a tooltip that allows you to select a part of the text and save it.

    You can enrich your reading experience with highlights and come back to passages you want to remember. All stories with highlights are tagged as “Highlights” in your Saved Story tags list. That way you can immediately come back to your highlights.

    Second, you can now also write private notes to yourself. If you’re doing research and want to remember why a particular story is being saved, the private notes text box can save your thoughts without having to share them with the world.

    A few other small changes have been added to this feature. You can also save stories and tag them from any website using the bookmarklet (which you can install under Manage > Goodies > Bookmarklet).

    Lots to live in this release! Keep posting good ideas to the forum.

  • Turn the lights down, dark mode has come to NewsBlur

    We’ve had dark mode on iOS and Android for years but I’m now pleased to announce a worthy dark theme has come to the NewsBlur web app.

    The origins for this theme came from the community. Originally started by Kemwer in 2013, it has been maintained and updated by Splike since 2014. In fact, you can still use Splike’s theme as an alternate dark mode.

    That’s 7 years of NewsBlur having an unofficial dark mode, but users had to jump through hoops to use it: installing a browser extension (which had a malware scare in 2018) or having to copy the Stylish CSS to NewsBlur’s Account settings where it would need to be manually updated. What NewsBlur needed was having it built in.

    Today NewsBlur is shipping first-class support. Building a dark theme requires more than inverting the existing color scheme, turning white to black and green to purple. Quite a bit of thought around UX and information hierarchy went into this dark theme design. I also used this as an opportunity to freshen up icons and small visual details on both light and dark themes.

    Now we have a consistent dark theme across all of the first-party apps. The Android app had dark mode first in 2014. Then came the iOS app is 2016. Now we’re firmly in 2020 and it’s made it to the web. Goes to show that NewsBlur is always getting better. 

    If you like the new features we’ve been releasing recently, I would greatly appreciate if you could share a tweet or Facebook post about NewsBlur. If you enjoy staying connected with culture and news through NewsBlur and you think your friends and followers would too, let them know about your news reader of choice. I appreciate all the kind comments that have come in since releasing this new theme.

    In love 🥰 with the new dark theme of @NewsBlur ! Kudos @samuelclay 👍

    — Jean Traullé (@jtraulle) June 24, 2020

    Ooooooooooooooo @NewsBlur pic.twitter.com/eG3XSXzuAG

    — Billy O’Neal (@MalwareMinigun) June 23, 2020

    And please keep the good ideas coming on the forum.

  • See the news on your Android dashboard with the new home screen widget

    Hot on the heels of the iOS widget release a few months ago, the Android widget is now ready to go!

    Check it out:

    Ideally both iOS and Android widgets would have been released at the same time. But now that we have a new Android developer, Andrei Dan, we’ve built the widget and are planning many more new features for Android.

    Everything I wrote for the iOS release holds for today’s Android widget:

    > Most of the time when we release a new feature, it finds immediate use. But every so often a new feature comes along that changes how NewsBlur gets used. I consider offline stories part of this exclusive club. Same with the Text view, which shows you the full text of a story. And push notifications are right up there.

    If you’re like me and you rely on your phone for your news consumption, having stories handy every time you look at your phone changes your relationship to NewsBlur.

    It’s so incredibly useful to have NewsBlur come to me. I hope you feel the same about this Android widget.

    If you have any feedback, ideas, or would like changes, please post them on the NewsBlur support forum.

  • Catch the news in a glimpse with the new NewsBlur Today View widget on iOS

    Most of the time when we release a new feature, it finds immediate use. But every so often a new feature comes along that changes how NewsBlur gets used. I consider offline stories part of this exclusive club. Same with the Text view, which shows you the full text of a story. And push notifications are right up there.

    Today, I’m pleased to announce the launch of our new Today View widget on iOS.

    Instead of having to open up the app to see what’s new, the stories come to you in the Today View, adjacent to the notification center. Personally I find myself checking this Today View widget a dozen times more than I open the NewsBlur app. It’s so incredibly useful to have NewsBlur come to me.

    Additionally, in version 10.0 of the iOS app, we have a bunch of new features:

    • A new iOS widget shows the latest stories in your Notification Center and on your iPad dashboard
    • Statistics visualization for every site
    • Automatic downloading of the original story full text for offline reading
    • Unsubscribe from a feed directly from a story
    • Preferences import & export

    And tons of bugs were fixed along with other small improvements:

    • Fixed crash on start for a few users
    • Fixed highlighting issue
    • Fixed settings with stories on bottom
    • Tweaked dark theme colors to be darker
    • Fixed wonky behavior on iPad
    • Clearing offline now clears the cached stories, text, and images from the database
    • Manually changing the theme now turns off the preference to follow the system appearance
    • Turning on following the system appearance immediately updates the theme appropriately
    • Fixed crash on feed load list
    • Fixed crash on start

    And if you’re an Android user, I just want you to know that we intended to ship this feature first on Android (and in fact, it is 90% built) but then our Android developer bailed. I’ll be hiring for another Android devleoper soon, but if that interests you, please reach out!

  • Secure images for everybody

    There are two ways to connect to the NewsBlur website. The first is http://www.newsblur.com. The second is https://www.newsblur.com. The first is plain text and the second is encrypted. You get to choose which one you want to use.

    Part of the draw of using an encrypted https connection instead of a plain text http connection is that you can protect your privacy. As far as I can tell, there are two reasons for preferring https over http.

    One is that using an encrypted https connection to NewsBlur protects what you read from hackers or a man-in-the-middle changing your data as it comes to you. This could be your internet service provider (ISP) inserting ads or it could be snooping wifi router that you are connected to that injects malware into your content. Some companies have been known to do this and https protects you.

    But the second reason is that your privacy is also protected from more benign, aggregate collections by ISPs and middlemen that sees what you read and sells that data. NewsBlur doesn’t sell any of your data and beginning this week NewsBlur can ensure that nobody other than you and the site you read can either.

    The feature that is launching this week (it actually launched Monday in order for me to ensure that it works well) is a secure image proxy for all images served on NewsBlur. That means that NewsBlur will take any images that isn’t behind an encrypted https connection and proxies it behind NewsBlur’s own secure, encrypted connection.

    You should notice next to no difference. The only difference you may notice is that some images may load faster, since NewsBlur has a thicker pipe to the Internet and can download data faster than your client browser can, which means that your persistent connection to NewsBlur’s servers takes over instead of having to make new connections with the associated overhead to various servers around the net.

    Now you can turn on the SSL setting on the NewsBlur Web and ensure your data stays private.

    And to answer the question of why you wouldn’t wan t to use https — it used to mean serving and loading pages over https gave a slight performance hit, but that’s no longer true. But some people use http because it will load images from both http and https websites, whereas loading NewsBlur via https means that you can only load images via https, as loading an image via http will throw up a Mixed Content Warning. This update addresses that issue and it is my hope that http-only will be phased out.

  • NewsBlur iOS v9: full screen, autoscroll, customizable story titles, story change highlighter, and return to last read story

    A whopper of a release with many, many new features!

    • Autoscroll: Read long stories hands-free
    • Full screen: Reading stories without the toolbar for a better experience
    • Longer story titles: New options for longer and shorter story title and content previews in the story titles list
    • Smaller image previews: New option for smaller image previews in the story titles list
    • Show story changes: All stories with edits now show a “Show Changes” button at the top that lets you see the differences
    • Return to last read story: When you return to the app, you will start where you left off
    • Return to last read scroll position: When you return to a story, you will automatically scroll to where you left off

    Take a look at some of the image and story title customizations you can now make:

    There’s also many smaller fixes that improve the polish of the app:

    • If you had a slow connection, some stories would take a while to draw while images were downloaded. Now they show immediately
    • Support for larger iPad Pros
    • Suport for iOS 13
    • Fixes for split mode on iPad
    • Fixes for marking stories as read while scrolling the story titles list
    • Fixes for navigating stories with an external keyboard
    • Fixes for scroll performance on the feed list and the story titles list
    • Fixes for sharing stories accidentally having double titles in emails and messages

    Thanks to David Sinclair for putting together this release. Keep up the great work! And if you have ideas for what you’d like to see in the next NewsBlur iOS release, please, please, please submit them to the forum.

subscribe via RSS