CVE-2015-9231 (published 2017-09-20T20:29Z)

iTerm2 3.x before 3.1.1 allows remote attackers to discover passwords by reading DNS queries. A new (default) feature was added to iTerm2 version 3.0.0 (and unreleased 2.9.x versions such as 2.9.20150717) that resulted in a potential information disclosure. In an attempt to see whether the text under the cursor (or selected text) was a URL, the text would be sent as an unencrypted DNS query. This has the potential to result in passwords and other sensitive information being sent in cleartext without the user being aware.

Severity: MEDIUM
CVSS v2 base score: 5.0 (AV:N/AC:L/Au:N/C:P/I:N/A:N)
CVSS v3 base score: 7.5, HIGH (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

Weakness information:
cwe_id: CWE-200
cwe_name: Exposure of Sensitive Information to an Unauthorized Actor
description: The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
extended_description: 
	   There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker.  Some kinds of sensitive information include:
       
         private, personal information, such as personal messages, financial data, health records, geographic location, or contact details
         system status and environment, such as the operating system and installed packages
		 business secrets and intellectual property
		 network status and configuration
		 the product's own code or internal state
         metadata, e.g. logging of connections or message headers
		 indirect information, such as a discrepancy between two internal operations that can be observed by an outsider
       
	    Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected.  These parties include:
               
                  the product's own users
                  people or organizations whose information is created or used by the product, even if they are not direct product users
		  the product's administrators, including the admins of the system(s) and/or networks on which the product operates
                  the developer
               
	    Information exposures can occur in different ways:
               
                  the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized"
                  a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program.
                  the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place.
               
	    It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read.  CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
         
         

Fix information:
repo_url: https://github.com/gnachman/iTerm2
commit_details: repo_url: https://github.com/gnachman/iTerm2
author: George Nachman
author_date: 2017-09-20 10:05:38-07:00
msg: Fist swipe at removing DNS code
repository: repo_url: https://github.com/gnachman/iTerm2
repo_name: gnachman/iTerm2
description: iTerm2 is a terminal emulator for Mac OS X that does amazing things.
repo_language: Objective-C
owner: gnachman
file_changes: filename: project.pbxproj
change_type: ModificationType.MODIFY
diff: @@ -630,7 +630,6 @@
 		1D6C4D5A122329F000E0AA3E /* ColorPresets.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D6C4D59122329F000E0AA3E /* ColorPresets.plist */; };
 		1D6C50A71226EEFB00E0AA3E /* ProfileListView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D6C50A51226EEFB00E0AA3E /* ProfileListView.h */; };
 		1D6ED85619AEA20D005A7799 /* URLAction.h in Headers */ = {isa = PBXBuildFile; fileRef = A6CFDAD0185D2587005DC94B /* URLAction.h */; };
-		1D6ED85719AEA20D005A7799 /* AsyncHostLookupController.h in Headers */ = {isa = PBXBuildFile; fileRef = A6CFDAD5185D53C2005DC94B /* AsyncHostLookupController.h */; };
 		1D6ED85819AEA20D005A7799 /* LineBufferPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D78B55C183EE1C000014D49 /* LineBufferPosition.h */; };
 		1D6ED85919AEA20D005A7799 /* FindContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D53FD13181C4B4B00524D4F /* FindContext.h */; };
 		1D6ED85A19AEA20D005A7799 /* ProfilesTerminalPreferencesViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A6A2698D1900F95D00437DA9 /* ProfilesTerminalPreferencesViewController.h */; };
@@ -2017,7 +2016,6 @@
 		A6C763011B45C52B00E3C992 /* TransferrableFileMenuItemViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A68A30D9186D1429007F550F /* TransferrableFileMenuItemViewController.m */; };
 		A6C763021B45C52B00E3C992 /* VT100RemoteHost.m in Sources */ = {isa = PBXBuildFile; fileRef = A68A30DA186D1429007F550F /* VT100RemoteHost.m */; };
 		A6C763031B45C52B00E3C992 /* VT100WorkingDirectory.m in Sources */ = {isa = PBXBuildFile; fileRef = A68A30DB186D1429007F550F /* VT100WorkingDirectory.m */; };
-		A6C763051B45C52B00E3C992 /* AsyncHostLookupController.m in Sources */ = {isa = PBXBuildFile; fileRef = A6CFDAD6185D53C2005DC94B /* AsyncHostLookupController.m */; };
 		A6C763061B45C52B00E3C992 /* BackgroundThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DA26ABF15007507004B5792 /* BackgroundThread.m */; };
 		A6C763071B45C52B00E3C992 /* CapturedOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = A67F57D31B11882900B4F135 /* CapturedOutput.m */; };
 		A6C763091B45C52B00E3C992 /* iTermCommandHistoryCommandUseMO+Addtions.m in Sources */ = {isa = PBXBuildFile; fileRef = A6E7474C188C6394005355CF /* iTermCommandHistoryCommandUseMO+Addtions.m */; };
@@ -2317,7 +2315,6 @@
 		A6CEDA6119988A7300BB57EC /* LogoShadow.png in Resources */ = {isa = PBXBuildFile; fileRef = A6CEDA5E19988A7300BB57EC /* LogoShadow.png */; };
 		A6CEDA6219988A7300BB57EC /* LogoShadow.png in Resources */ = {isa = PBXBuildFile; fileRef = A6CEDA5E19988A7300BB57EC /* LogoShadow.png */; };
 		A6CFDAD2185D2587005DC94B /* URLAction.h in Headers */ = {isa = PBXBuildFile; fileRef = A6CFDAD0185D2587005DC94B /* URLAction.h */; };
-		A6CFDAD7185D53C2005DC94B /* AsyncHostLookupController.h in Headers */ = {isa = PBXBuildFile; fileRef = A6CFDAD5185D53C2005DC94B /* AsyncHostLookupController.h */; };
 		A6D22A431BC8BE6B004084E0 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A6D22A411BC8BE6B004084E0 /* Model.xcdatamodeld */; };
 		A6D22A441BC8BE6B004084E0 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A6D22A411BC8BE6B004084E0 /* Model.xcdatamodeld */; };
 		A6D22A451BC8BE6B004084E0 /* Model.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A6D22A411BC8BE6B004084E0 /* Model.xcdatamodeld */; };
@@ -3837,8 +3834,6 @@
 		A6CEDA5E19988A7300BB57EC /* LogoShadow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = LogoShadow.png; path = images/LogoParts/LogoShadow.png; sourceTree = "<group>"; };
 		A6CFDAD0185D2587005DC94B /* URLAction.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = URLAction.h; sourceTree = "<group>"; tabWidth = 4; };
 		A6CFDAD1185D2587005DC94B /* URLAction.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = URLAction.m; sourceTree = "<group>"; tabWidth = 4; };
-		A6CFDAD5185D53C2005DC94B /* AsyncHostLookupController.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = AsyncHostLookupController.h; sourceTree = "<group>"; tabWidth = 4; };
-		A6CFDAD6185D53C2005DC94B /* AsyncHostLookupController.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = AsyncHostLookupController.m; sourceTree = "<group>"; tabWidth = 4; };
 		A6D22A421BC8BE6B004084E0 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; };
 		A6D22B431BC9D368004084E0 /* iTermShellHistoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = iTermShellHistoryTest.m; sourceTree = "<group>"; };
 		A6DF401A1897607E00F05947 /* NSTextField+iTerm.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = "NSTextField+iTerm.h"; sourceTree = "<group>"; tabWidth = 4; };
@@ -4202,7 +4197,6 @@
 				A66DB8341C8E4CBB00233E88 /* iTermOpenQuicklyCommands.h */,
 				A6E7138C18F26A91008D94DD /* AppearancePreferencesViewController.h */,
 				1D2560A813EE60E4006B35CD /* ArrangementPreviewView.h */,
-				A6CFDAD5185D53C2005DC94B /* AsyncHostLookupController.h */,
 				1DE214DF128212EE004E3ADF /* Autocomplete.h */,
 				1DA26ABE15007507004B5792 /* BackgroundThread.h */,
 				1D9DCC0C142D7F5F0016228A /* BellTrigger.h */,
@@ -5630,7 +5624,6 @@
 				A6E761631D39D216005C0E5C /* iTermMutableAttributedStringBuilder.m */,
 				539325EE1DD66EF100CABCEF /* iTermPreciseTimer.h */,
 				539325EF1DD66EF100CABCEF /* iTermPreciseTimer.m */,
-				A6CFDAD6185D53C2005DC94B /* AsyncHostLookupController.m */,
 				1DA26ABF15007507004B5792 /* BackgroundThread.m */,
 				A67F57D31B11882900B4F135 /* CapturedOutput.m */,
 				1D53FD14181C4B4B00524D4F /* FindContext.m */,
@@ -6134,7 +6127,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				1D6ED85619AEA20D005A7799 /* URLAction.h in Headers */,
-				1D6ED85719AEA20D005A7799 /* AsyncHostLookupController.h in Headers */,
 				1D6ED85819AEA20D005A7799 /* LineBufferPosition.h in Headers */,
 				1D6ED85919AEA20D005A7799 /* FindContext.h in Headers */,
 				1D6ED85A19AEA20D005A7799 /* ProfilesTerminalPreferencesViewController.h in Headers */,
@@ -6478,7 +6470,6 @@
 			buildActionMask = 2147483647;
 			files = (
 				A6CFDAD2185D2587005DC94B /* URLAction.h in Headers */,
-				A6CFDAD7185D53C2005DC94B /* AsyncHostLookupController.h in Headers */,
 				1D78B55E183EE1C000014D49 /* LineBufferPosition.h in Headers */,
 				A65B72781B2BF2D200F947A7 /* iTermProfilesPanel.h in Headers */,
 				1D53FD15181C4B4B00524D4F /* FindContext.h in Headers */,
@@ -8485,7 +8476,6 @@
 				A6C7637C1B45C52B00E3C992 /* ProfilesColorsPreferencesViewController.m in Sources */,
 				A6C763E21B45C6DD00E3C992 /* PSMTabDragWindow.m in Sources */,
 				A6936B5A1D2F5D1A00521B04 /* iTermHotkeyPreferencesModel.m in Sources */,
-				A6C763051B45C52B00E3C992 /* AsyncHostLookupController.m in Sources */,
 				A6C763DA1B45C6DD00E3C992 /* NSWindow+PSM.m in Sources */,
 				A6C763121B45C52B00E3C992 /* iTermImageInfo.m in Sources */,
 				A6C7636E1B45C52B00E3C992 /* iTermPreferences.m in Sources */,

programming_language: JavaScript
filename: AsyncHostLookupController.h
change_type: ModificationType.DELETE
diff: @@ -1,25 +0,0 @@
-//
-//  AsyncHostLookupController.h
-//  iTerm
-//
-//  Created by George Nachman on 12/14/13.
-//
-//
-
-#import <Foundation/Foundation.h>
-
-// Verify whether host names are valid. Runs in a separate thread and provides asynchronous results.
-// Caches very aggressively.
-@interface AsyncHostLookupController : NSObject
-
-+ (instancetype)sharedInstance;
-
-// Calls back to completion indicating whether |host| is an extant hostname. The BOOL is YES if the
-// hostname resolves. |host| is passed as the second argument to completion. Does not block.
-- (void)getAddressForHost:(NSString *)host
-               completion:(void (^)(BOOL, NSString*))completion;
-
-// Cancels the lookup for |hostname|.
-- (void)cancelRequestForHostname:(NSString *)hostname;
-
-@end

programming_language: unknown
filename: AsyncHostLookupController.m
change_type: ModificationType.DELETE
diff: @@ -1,119 +0,0 @@
-//
-//  AsyncHostLookupController.m
-//  iTerm
-//
-//  Created by George Nachman on 12/14/13.
-//
-//
-
-#import "AsyncHostLookupController.h"
-#import "DebugLogging.h"
-#import "iTermAdvancedSettingsModel.h"
-#include <netdb.h>
-
-@implementation AsyncHostLookupController {
-    // Created at initialization and used to perform blocking gethostbyname calls.
-    dispatch_queue_t _queue;
-
-    // Set of hostnames waiting to be looked up. If a hostname is removed from
-    // this set then it won't be looked up when its turn comes around.
-    NSMutableSet *_pending;
-
-    // Maps hostname -> @YES or @NO, indicating if it resolved.
-    NSMutableDictionary *_cache;
-}
-
-+ (instancetype)sharedInstance {
-    static AsyncHostLookupController *instance;
-    static dispatch_once_t once;
-    dispatch_once(&once, ^{
-        instance = [[self alloc] init];
-    });
-    return instance;
-}
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        _queue = dispatch_queue_create("AsyncHostLookupControllerQueue", NULL);
-        _pending = [[NSMutableSet alloc] init];
-        _cache = [[NSMutableDictionary alloc] init];
-    }
-    return self;
-}
-
-- (void)dealloc {
-    // The logic for cleaning up the dispatch queue isn't written, so just make sure the singleton
-    // never gets dealloced.
-    assert(false);
-    [super dealloc];
-}
-
-- (void)getAddressForHost:(NSString *)hostname
-               completion:(void (^)(BOOL, NSString *))completion {
-    if (![iTermAdvancedSettingsModel performDNSLookups]) {
-        completion(YES, hostname);
-        return;
-    }
-
-    NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
-    @synchronized(self) {
-        if ([_pending containsObject:hostname]) {
-            DLog(@"Already pending %@", hostname);
-            return;
-        }
-        NSNumber *okNumber = _cache[hostname];
-        if (okNumber) {
-            completion([okNumber boolValue], hostname);
-            return;
-        }
-        [_pending addObject:hostname];
-    }
-    dispatch_async(_queue, ^() {
-        @synchronized(self) {
-            if (![_pending containsObject:hostname]) {
-                DLog(@"Abort nslookup for %@", hostname);
-                return;
-            }
-        }
-
-        BOOL shouldCache;
-        BOOL ok = [self hostnameHasAddress:[hostname UTF8String] shouldCache:&shouldCache];
-        if (shouldCache) {
-            @synchronized(self) {
-                _cache[hostname] = @(ok);
-            }
-        }
-        dispatch_async(dispatch_get_main_queue(), ^() {
-            @synchronized(self) {
-                if (![_pending containsObject:hostname]) {
-                    DLog(@"Finished nslookup but don't call block for %@", hostname);
-                    return;
-                }
-                [_pending removeObject:hostname];
-            }
-            DLog(@"Host %@: %@", hostname, ok ? @"OK" : @"Unknown");
-            completion(ok, hostname);
-        });
-    });
-    DLog(@"Blocked main thread for %f sec", [NSDate timeIntervalSinceReferenceDate] - start);
-}
-
-- (void)cancelRequestForHostname:(NSString *)hostname {
-    @synchronized(self) {
-        [_pending removeObject:hostname];
-    }
-}
-
-- (BOOL)hostnameHasAddress:(const char *)hostname shouldCache:(BOOL *)shouldCache {
-    struct addrinfo *servinfo;
-    int status = getaddrinfo(hostname, NULL, NULL, &servinfo);
-    if (status == 0) {
-        freeaddrinfo(servinfo);
-    }
-    // Don't cache temporary failures
-    *shouldCache = (status != EAI_AGAIN);
-    return status == 0;
-}
-
-@end

programming_language: unknown
filename: PTYTextView.m
change_type: ModificationType.MODIFY
diff: @@ -1,6 +1,5 @@
 #import "PTYTextView.h"
 
-#import "AsyncHostLookupController.h"
 #import "charmaps.h"
 #import "FileTransferManager.h"
 #import "FontSizeEstimator.h"
@@ -96,10 +95,6 @@ static const NSUInteger kDragPaneModifiers = (NSAlternateKeyMask | NSCommandKeyM
 static const NSUInteger kRectangularSelectionModifiers = (NSCommandKeyMask | NSAlternateKeyMask);
 static const NSUInteger kRectangularSelectionModifierMask = (kRectangularSelectionModifiers | NSControlKeyMask);
 
-// Notifications posted when hostname lookups finish. Notifications are used to
-// avoid dangling references.
-static NSString *const kHostnameLookupFailed = @"kHostnameLookupFailed";
-static NSString *const kHostnameLookupSucceeded = @"kHostnameLookupSucceeded";
 static PTYTextView *gCurrentKeyEventTextView;  // See comment in -keyDown:
 
 // Minimum distance that the mouse must move before a cmd+drag will be
@@ -119,9 +114,6 @@ static const int kDragThreshold = 3;
     NSMenuDelegate,
     NSPopoverDelegate>
 
-// Set the hostname this view is currently waiting for AsyncHostLookupController to finish looking
-// up.
-@property(nonatomic, copy) NSString *currentUnderlineHostname;
 @property(nonatomic, retain) iTermSelection *selection;
 @property(nonatomic, retain) iTermSemanticHistoryController *semanticHistoryController;
 @property(nonatomic, retain) iTermFindCursorView *findCursorView;
@@ -309,14 +301,6 @@ static const int kDragThreshold = 3;
                                                  selector:@selector(_pointerSettingsChanged:)
                                                      name:kPointerPrefsChangedNotification
                                                    object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self
-                                                 selector:@selector(hostnameLookupFailed:)
-                                                     name:kHostnameLookupFailed
-                                                   object:nil];
-        [[NSNotificationCenter defaultCenter] addObserver:self
-                                                 selector:@selector(hostnameLookupSucceeded:)
-                                                     name:kHostnameLookupSucceeded
-                                                   object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self
                                                  selector:@selector(imageDidLoad:)
                                                      name:iTermImageDidLoad
@@ -400,10 +384,6 @@ static const int kDragThreshold = 3;
     [threeFingerTapGestureRecognizer_ disconnectTarget];
     [threeFingerTapGestureRecognizer_ release];
 
-    if (self.currentUnderlineHostname) {
-        [[AsyncHostLookupController sharedInstance] cancelRequestForHostname:self.currentUnderlineHostname];
-    }
-    [_currentUnderlineHostname release];
     _indicatorsHelper.delegate = nil;
     [_indicatorsHelper release];
     _selectionScrollHelper.delegate = nil;
@@ -1115,7 +1095,6 @@ static const int kDragThreshold = 3;
     // Draw the cursor filled in when we're inactive if there's a popup open or key focus was stolen.
     _drawingHelper.shouldDrawFilledInCursor = ([self.delegate textViewShouldDrawFilledInCursor] || _keyFocusStolenCount);
     _drawingHelper.isFrontTextView = (self == [[iTermController sharedInstance] frontTextView]);
-    _drawingHelper.haveUnderlinedHostname = (self.currentUnderlineHostname != nil);
     _drawingHelper.transparencyAlpha = [self transparencyAlpha];
     _drawingHelper.now = [NSDate timeIntervalSinceReferenceDate];
     _drawingHelper.drawMarkIndicators = [_delegate textViewShouldShowMarkIndicators];
@@ -1772,10 +1751,6 @@ static const int kDragThreshold = 3;
     }
     _drawingHelper.underlinedRange =
         VT100GridAbsWindowedRangeMake(VT100GridAbsCoordRangeMake(-1, -1, -1, -1), 0, 0);
-    if (self.currentUnderlineHostname) {
-        [[AsyncHostLookupController sharedInstance] cancelRequestForHostname:self.currentUnderlineHostname];
-    }
-    self.currentUnderlineHostname = nil;
     [self setNeedsDisplay:YES];  // It would be better to just display the underlined/formerly underlined area.
 }
 
@@ -1809,29 +1784,9 @@ static const int kDragThreshold = 3;
 
                 if (action.actionType == kURLActionOpenURL) {
                     NSURL *url = [NSURL URLWithUserSuppliedString:action.string];
-                    if (![url.host isEqualToString:self.currentUnderlineHostname]) {
-                        if (self.currentUnderlineHostname) {
-                            [[AsyncHostLookupController sharedInstance] cancelRequestForHostname:self.currentUnderlineHostname];
-                        }
-                        if (url && url.host) {
-                            self.currentUnderlineHostname = url.host;
-                            [[AsyncHostLookupController sharedInstance] getAddressForHost:url.host
-                                                                               completion:^(BOOL ok, NSString *hostname) {
-                                                                                   if (!ok) {
-                                                                                       [[NSNotificationCenter defaultCenter] postNotificationName:kHostnameLookupFailed
-                                                                                                                                           object:hostname];
-                                                                                   } else {
-                                                                                       [[NSNotificationCenter defaultCenter] postNotificationName:kHostnameLookupSucceeded
-                                                                                                                                           object:hostname];
-                                                                                   }
-                                                                               }];
-                        }
+                    if (url && url.host) {
+                        [self setNeedsDisplay:YES];
                     }
-                } else {
-                    if (self.currentUnderlineHostname) {
-                        [[AsyncHostLookupController sharedInstance] cancelRequestForHostname:self.currentUnderlineHostname];
-                    }
-                    self.currentUnderlineHostname = nil;
                 }
             } else {
                 [self removeUnderline];
@@ -6188,23 +6143,6 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
                                        }];
 }
 
-- (void)hostnameLookupFailed:(NSNotification *)notification {
-    if ([[notification object] isEqualToString:self.currentUnderlineHostname]) {
-        self.currentUnderlineHostname = nil;
-        [self removeUnderline];
-        _drawingHelper.underlinedRange =
-            VT100GridAbsWindowedRangeMake(VT100GridAbsCoordRangeMake(-1, -1, -1, -1), 0, 0);
-        [self setNeedsDisplay:YES];
-    }
-}
-
-- (void)hostnameLookupSucceeded:(NSNotification *)notification {
-    if ([[notification object] isEqualToString:self.currentUnderlineHostname]) {
-        self.currentUnderlineHostname = nil;
-        [self setNeedsDisplay:YES];
-    }
-}
-
 - (void)imageDidLoad:(NSNotification *)notification {
     if ([self imageIsVisible:notification.object]) {
         [self setNeedsDisplay:YES];

programming_language: Objective-C
filename: iTermAdvancedSettingsModel.h
change_type: ModificationType.MODIFY
diff: @@ -161,7 +161,6 @@
 + (BOOL)useColorfgbgFallback;
 + (BOOL)promptForPasteWhenNotAtPrompt;
 + (void)setPromptForPasteWhenNotAtPrompt:(BOOL)value;
-+ (BOOL)performDNSLookups;
 + (BOOL)zeroWidthSpaceAdvancesCursor;
 + (BOOL)darkThemeHasBlackTitlebar;
 + (BOOL)fontChangeAffectsBroadcastingSessions;

programming_language: Objective-C
filename: iTermAdvancedSettingsModel.m
change_type: ModificationType.MODIFY
diff: @@ -182,7 +182,6 @@ DEFINE_BOOL(ignoreHardNewlinesInURLs, NO, @"Semantic History: Ignore hard newlin
 DEFINE_STRING(URLCharacterSet, @".?\\/:;%=&_-,+~#@!*'(（)）|[]", @"Semantic History: Non-alphanumeric characters considered part of a URL for Semantic History.\nLetters and numbers are always considered part of the URL. These non-alphanumeric characters are used in addition for the purposes of figuring out where a URL begins and ends.");
 DEFINE_INT(maxSemanticHistoryPrefixOrSuffix, 2000, @"Semantic History: Maximum number of bytes of text before and after click location to take into account.\nThis also limits the size of the \\3 and \\4 substitutions.");
 DEFINE_STRING(pathsToIgnore, @"", @"Semantic History: Paths to ignore for Semantic History.\nSeparate paths with a comma. Any file under one of these paths will not be openable with Semantic History.");
-DEFINE_BOOL(performDNSLookups, NO, @"Semantic History: Perform DNS lookups to check if URLs are valid?\nWhen enabled, the name under the mouse will be resolved with DNS to determine if it is a clickable link.");
 DEFINE_BOOL(showYellowMarkForJobStoppedBySignal, YES, @"Semantic History: Use a yellow for a Shell Integration prompt mark when the job is stopped by a signal.");
 
 #pragma mark - Debugging

programming_language: Objective-C
filename: iTermTextDrawingHelper.h
change_type: ModificationType.MODIFY
diff: @@ -159,9 +159,6 @@
 // TODO: This might be the same as textViewIsActiveSession.
 @property(nonatomic, assign) BOOL isFrontTextView;
 
-// Is there an underlined hostname?
-@property(nonatomic, assign) BOOL haveUnderlinedHostname;
-
 // Background transparency level. Should be 1 if transparency is off for this view.
 @property(nonatomic, assign) double transparencyAlpha;
 

programming_language: Objective-C
filename: iTermTextDrawingHelper.m
change_type: ModificationType.MODIFY
diff: @@ -110,7 +110,6 @@ typedef struct iTermTextColorContext {
     NSColor *backgroundColor;
     NSColor *previousBackgroundColor;
     CGFloat minimumContrast;
-    BOOL haveUnderlinedHostname;
     NSColor *previousForegroundColor;
 } iTermTextColorContext;
 
@@ -1555,7 +1554,7 @@ static NSColor *iTermTextDrawingHelperGetTextColor(screen_char_t *c,
         // Black-on-yellow search result.
         rawColor = [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:1];
         context->havePreviousCharacterAttributes = NO;
-    } else if (inUnderlinedRange && !context->haveUnderlinedHostname) {
+    } else if (inUnderlinedRange) {
         // Blue link text.
         rawColor = [context->colorMap colorForKey:kColorMapLink];
         context->havePreviousCharacterAttributes = NO;
@@ -1865,7 +1864,6 @@ static BOOL iTermTextDrawingHelperIsCharacterDrawable(screen_char_t *c,
         .havePreviousCharacterAttributes = NO,
         .backgroundColor = backgroundColor,
         .minimumContrast = _minimumContrast,
-        .haveUnderlinedHostname = _haveUnderlinedHostname,
         .previousForegroundColor = nil,
     };
     NSDictionary *previousImageAttributes = nil;

programming_language: Objective-C