Httpverifysni

Commit Message:
Background
The SNI of a connection is persistent but the host header of http request within that connection can be different.
The attack could provide a guest.example.com SNI and an admin.example.com header.
There is risk that route config does not explicitly deny the admin.example.com host,
I have seen 3 different orgs discover the issue and used their own lua filter as mitigation.
Alternatives

Use route config for HCM instance under different SNI matches.
It's likely that 2 route configs have thousands routes the same but only 1 or 2 for deny.  This almost double the route config items in memory.
RBAC
It seems possible but I don't see anyone adopting it as mitigation.
Refined SNI matches in filter chain.
e.g. always allow *.exmaple.com and use the RBAC or route to execute the deny.
This is need a restructure of configs from listener - filter chain - HCM - http route config.

Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fixes #6767
[Optional Deprecated:]
[Optional API Considerations:]

I'm still not convinced why this has to be a separate filter. If 2. RBAC works and just no one adopt, we should just add a FAQ or a suggestion in SNI config for that?

+1 let's just better document using RBAC.
/wait

I give it try in RBAC: there is something missing. Please advice if I don't fully get the ability of rbac

DENY with response code 421 So it's another field response code added with DENY policy.
Other response code may confuse the browser.
SNI match other than StringMatcher. It's awkward to match the SNI requirement.
https://github.com/envoyproxy/envoy/blob/main/api/envoy/config/listener/v3/listener_components.proto#L154-L163
Set based match with wildcard
In host http match we create suffix or prefix tree and in filter chain match. Ideally we should use the similar tech here instead of series of "and_match" and "or_match". This requirement might be light.

RBAC seems like the right place to do this, so let's propose changes to RBAC to make this possible. I don't know why we would have a new filter for this. The alternative would be that this is so important that we make this a core security feature.
/wait

RBAC seems like the right place to do this, so let's propose changes to RBAC to make this possible. I don't know why we would have a new filter for this. The alternative would be that this is so important that we make this a core security feature.

What do you think if put the require_host_equal_to_sni in HCM and the complicate allow + deny in RBAC?
Suppose we have 2 filter chains, one for  for SNI=*.example.com and one for SNI=admin.example.com
The require_host_equal_to_sni well on

allow SNI=foo.example.com Host=foo.example.com
reject SNI=foo.example.com Host=admin.example.com

But if anyone want to additionally allow SNI=foo.example.com Host=bar.example.com the user should use RBAC.

If we believe this is a serious enough security problem that it's hitting multiple people, I think having this be a core feature is reasonable. I think your proposal of how to handle is also reasonable. I'm OK with adding a core feature for this, but I would like to here from @alyssawilk @antoniovicente @htuch @yanavlasov on this. If we do add the core feature my preference would be to make this secure by default (with runtime override for the default).

"The attack could provide a guest.example.com SNI and an admin.example.com header."
So I think by default Envoy should enforce that host header is allowed by the cert served (admin.foo.com should not be served under bar.foo.com cert but should be allowed under *.foo.com cert).  I'd be all for that being on by default, runtime guarded off if that's not the current behavior.  But if you want to serve *.foo.com certs and reject admin.foo.com I'd think you could just have normal route actions and static response "disallowed".  Either way I'm not sure why additional configuration should be required?

Either way I'm not sure why additional configuration should be required?

I think the only reason would be if this change breaks some deployment. I think we could start with a runtime guard though and see if anyone complains.

Yeah, let's runtime guard, and but folks complain my fail-over would be adding deny routes over additional config. I don't think it would necessarily double route memory but we can debate that if runtime guarding exposes problems :-)

my fail-over would be adding deny routes over additional config

Yeah agreed we can cross this bridge later. My preference would actually be to build this into RBAC/WAF vs. new route matching but we can discuss later.

So I think by default Envoy should enforce that host header is allowed by the cert served (admin.foo.com should not be served under bar.foo.com cert but should be allowed under *.foo.com cert).

+1 That's a sub-issue. As long as a runtime guard is provided to bridge the migration people should be good.

But if you want to serve *.foo.com certs and reject admin.foo.com I'd think you could just have normal route actions and static response "disallowed". Either way I'm not sure why additional configuration should be required?

That works for sure. My only concern is that this is not practical. The common route configure between admin.example.com HCM in network filter chain and *.example.com HCM in network filter chain.  It's helpful and greatly simplify the control plane and the overall config to make AUTH and route orthogonal
From the Envoy config level, they differs only at listener config.

Envoy config
*.example.com
admin.example.com

listener servername
*.example.com
admin.example.com

listener tls require peer cert
no
yes

listener tls socket
*.example.com
*.example.com

listener HCM
same
same

My Proposal: req.host == connection.sni
so not admin.example.com
admin.example.com

Route Config in HCM
includes *.example.com
includes *.example.com

ah, so it's not just that you want to make sure admin.foo.com isn't served under cert bar.foo.com, you want to make sure that if the cert is *.foo.com and you sni for bar.foo.com you only can send requests for bar.foo.com?
That's certainly something we don't want to support by default, I believe all the major browsers (and Envoy itself will soon) pool admin.foo.com into the same connection with bar.foo.com if the cert allows and DNS matches. The 421 is supported in the spec (https://datatracker.ietf.org/doc/html/rfc7540#section-9.1.1) but I don't think most clients (envoy included) would take the 421 as an indication to retry with a new connection so I'd lean towards that being a custom filter or lua since I think it won't be handled on the internet at large, but if Matt says RBAC is the place to go I won't gainsay.

I create dedicated issue #17258 for certs dns names so we can focus on solutions of SNI.
I am closing this PR to propose a RBAC based solution for SNI


Exception Handling

Exceptions are expected to be thrown by #[Test]. Assertions could potentially throw a TestFailedException as well as the code under test could potentially throw any Throwable. We should ensure when processing a #[Test] a thrown Exception will result in a #[Test] failure. Additionally, each hook may also throw an exception. If a hook throws an exception we should not attempt to run the rest of the tests and fail early with details explaining why.
Additionally it could be expected that the code under test is checking that an exception is thrown under certain scenarios. We should support the use case where a #[Test] only passes IF an exception with expected type, message, and/or code is thrown and fails otherwise. The ability to expect an exception to have occurred is going to be pushed to the 0.4.0 release to ensure a proper Expectations API can be designed in tandem with similar functionality.

Initial implementation handled in https://github.com/labrador-kennel/async-testing/pull/16


Nesting repeaters for BelongsToMany relationships

Package
filament/filament
Package Version
v3.2
Laravel Version
v11.9
Livewire Version
v3.5
PHP Version
PHP 8.3
Problem description
Following the example of using a repeater to fill BelongsToMany relationships [https://filamentphp.com/docs/3.x/forms/fields/repeater], I want to nest two repeaters with BelongsToMany relationships to handle a scenario like this:
I have Orders that have Products, which in turn have Colors.
I'm encountering a bug during the initial save: the color is not saved correctly because the order_product_id column in the color_order_product table is null. However, if I add new colors to a product in the order afterward, the modification is saved correctly.
But if I add a new product, the same issue arises.
Repeater::make('order_product')
    ->relationship('orderProducts')
    ->schema([
        Select::make('product_id')
            ->relationship('product', 'title')
            ->required()
            ->live(),
        Repeater::make('colorOrderProducts')
            ->relationship('colorOrderProducts')
            ->schema([
                Select::make('color_id')
                    ->options(
                        function ($get) {
                            $selectedProduct = Product::find($get('../../product_id'));
                            if ($selectedProduct) {
                                return $selectedProduct->colors()->get()->pluck('title', 'id');
                            }
                        }
                    )
                    ->required(),
            ])
    ])

Expected behavior
When creating an order, adding products, and assigning colors to those products using the nested repeater, all entries should be saved correctly.
Steps to reproduce

Create an order with products and assign colors to those products using the nested repeater.

Save the order.

Check the color_order_product table and observe that the order_product_id column is null for the initially added colors.

Add new colors to the existing product and save again. Observe that these new colors are saved correctly.

Add a new product to the order and assign colors. Save and observe the issue reoccurs.

Reproduction repository
https://github.com/marc31/filament-nested-repeater-w-relationship
Relevant log output
No response

Donate 💰 to fund this issue

You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
100% of the funding will be distributed between the Filament core team to run all aspects of the project.
Thank you in advance for helping us make maintenance sustainable!

that was the same for me if you have a solution for this ,pldas
My Resource
<?php

namespace App\Filament\Resources;

use App\Filament\Enums\AdvantageLayoutTypeEnum;
use App\Filament\Resources\ProductCategoryResource\Pages;
use App\Models\ProductCategory;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Concerns\Translatable;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Support\Str;

class ProductCategoryResource extends Resource
{
    use Translatable;

    protected static ?string $model = ProductCategory::class;

    protected static ?string $navigationIcon = 'heroicon-o-queue-list';

    protected static ?string $navigationGroup = 'Manage Products';

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\TextInput::make('name')
                    ->required()
                    ->maxLength(255)
                    ->live(onBlur: true)
                    ->afterStateUpdated(function (string $operation, $state, Forms\Set $set): void {
                        if ($operation !== 'create') {
                            return;
                        }

                        $set('slug', Str::slug($state));
                    }),

                Forms\Components\TextInput::make('slug')
                    ->disabled()
                    ->dehydrated()
                    ->required()
                    ->maxLength(255)
                    ->unique(ProductCategory::class, 'slug', ignoreRecord: true),
                Forms\Components\FileUpload::make('icon')
                    ->image(),
                Forms\Components\FileUpload::make('image')
                    ->image(),
                Forms\Components\Repeater::make('advantages')
                    ->schema([
                        Forms\Components\TextInput::make('title')
                            ->required(),
                        Forms\Components\Repeater::make('contents')
                            ->schema([
                                Forms\Components\TextInput::make('order')
                                    ->numeric()
                                    ->required(),
                                Forms\Components\TextInput::make('title')
                                    ->required(),
                                Forms\Components\FileUpload::make('img')
                                    ->disk('public')
                                    ->directory('advantages')
                                    ->image(),
                                Forms\Components\MarkdownEditor::make('desc')
                                    ->required(),
                                Forms\Components\Select::make('type')
                                    ->options(AdvantageLayoutTypeEnum::class)
                                    ->required(),
                            ])
                            ->minItems(1)
                            ->collapsible()
                            ->required(),
                    ])
                    ->minItems(1)
                    ->addable(false)
                    ->deletable(false)
                    ->required()
                    ->columnSpanFull(),

            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\TextColumn::make('name')
                    ->searchable(),
                Tables\Columns\TextColumn::make('slug')
                    ->searchable()
                    ->toggleable(isToggledHiddenByDefault: true),
                Tables\Columns\ImageColumn::make('icon'),
                Tables\Columns\ImageColumn::make('image'),
                // Tables\Columns\TextColumn::make('advantages.title')
                //     ->searchable(),
                Tables\Columns\TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                Tables\Columns\TextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //
            ])
            ->actions([
                Tables\Actions\EditAction::make(),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

    public static function getPages(): array
    {
        return [
            'index'  => Pages\ListProductCategories::route('/'),
            'create' => Pages\CreateProductCategory::route('/create'),
            'edit'   => Pages\EditProductCategory::route('/{record}/edit'),
        ];
    }
}

my migration
Schema::create('product_categories', function (Blueprint $table): void {
            $table->id();
            $table->text('name');
            $table->string('slug')->unique();
            $table->string('icon')->nullable()->default(null);
            $table->string('image')->nullable()->default(null);
            $table->json('advantages')->nullable();
            $table->timestamps();
        });

my seeder
$category = ProductCategory::create([
                    'name'       => $categoriesName,
                    'slug'       => Str::slug($categoriesName),
                    'icon'       => 'advantages/01HZE5794C7ADXYKC9HPXHFHS2.png',
                    'image'      => 'advantages/01HZE5794A1KQQYGAQQ9V7Y8B6.png',
                    'advantages' => [
                        [
                            'title'    => 'Advantages of Bio Stimulant',
                            'contents' => [
                                [
                                    'order' => 1,
                                    'title' => 'BioStimulants Assits In Combating The Effects Of Enveromental Stresses',
                                    'img'   => 'advantages/01HZE5794A1KQQYGAQQ9V7Y8B6.png',
                                    'desc'  => fake()->paragraph(),
                                    'type'  => 'right section',
                                ], [
                                    'order' => 2,
                                    'title' => 'Qui aute corporis no',
                                    'img'   => 'advantages/01HZE5794C7ADXYKC9HPXHFHS2.png',
                                    'desc'  => fake()->paragraph(),
                                    'type'  => 'left section',
                                ],
                                [
                                    'order' => 3,
                                    'title' => 'Advantage 1',
                                    'img'   => 'advantage1.png',
                                    'desc'  => fake()->paragraph(),
                                    'type'  => 'right section',
                                ],
                                [
                                    'order' => 4,
                                    'title' => 'Advantage 2',
                                    'img'   => 'advantage2.png',
                                    'desc'  => fake()->paragraph(),
                                    'type'  => 'final section',
                                ],
                            ],
                        ],
                    ],
                ]);

Not sure if I’m having the same issue, but here:
app/Models/Guide.php
public function items(): BelongsToMany
{
    return $this->belongsToMany(Item::class);
}

Forms\Components\Repeater::make('steps')
    ->schema([
        Forms\Components\Select::make('item')
            ->relationship(name: 'items', titleAttribute: 'title')
            ->disableOptionsWhenSelectedInSiblingRepeaterItems()
            ->required(),
        Forms\Components\Textarea::make('description')
            ->autosize(),
    ]),

Desired behaviour:
To sync all repeater step items into the guide_item table.
Current behaviour:
It removes all current relations and attaches only the last repeater step item.

I have a similar problem, I have the tables:
purchase_request -> purchase_order -> receipt_materials_register
and I need get objects from purchase_request table. I tried a create method thats returns from purchase_order but withont success

I ran into a problem where the relational table with repeaters nested in the sublayers would have repeated data queries when I clicked the "Save" button to save the data. Five times the normal number of queries.

The immediate cause of my investigation is that the cachedExistingRecords attribute in Repeater->getCachedExistingRecords() is cached, causing cachedExistingRecords() to be null in each loop.

Deep reason is the Repeater::getChildComponentContainers() calls the getClone (). The result is that Repeaters in the inner layer always execute the getCachedExistingRecords() method on the new object being cloned.

I manually annotated the call to getClone() to see that the number of model queries was normal.

foreach ($this->getState() ??  [] as $itemKey => $itemData) {
  $containers[$itemKey] = $this
    ->getChildComponentContainer()
    ->statePath($itemKey)
    ->model($relationship ?  $records[$itemKey] ??  $this->getRelatedModel() : null)
    ->inlineLabel(false)
    ; //->getClone();
}

The existence of this code should have other purposes, hope to fix this problem as soon as possible.

annotated result:

Although the number of queries went down, my subelayer nested repeats of the same values.

When u edit the page in order selected color is not preloaded what to do for that?


simplify the SVG file + add light theme logo

feel free to squash instead of rebase

I forced pushed, I know, but I had to rebase to add the DCO requirement. Same code!


Zero downtime rebuilds

Am I correct in thinking that your response here means that rake ts:rebuild might be unnecessary when deploying?
https://groups.google.com/d/msg/thinking-sphinx/88a-Jj8_ok0/sVHOyp6-bOIJ

I've not taken that approach myself, but yes.
Also, just to be clear (I know very old docs may have suggested otherwise) if you have your paths set up to be constant between deploys (as covered in the documentation), rather than per-release, then rebuilds/restarts are only necessary on Sphinx index schema changes, or adding/removing indices.

Most of our deploys have schema changes. We are constantly adding new fields and indexing them.

Ah, well in that case, yeah, you'll definitely need to run the index/restart or rebuild tasks.

We deployed with a step in our capistrano script that has rake ts:index followed by rake ts:restart.
Over the weekend we started to see these errors:
Lost connection to MySQL server at 'reading initial communication packet', system error: 111 - SELECT * FROM `location_core`, `location_delta` WHERE `sphinx_deleted` = 0 ORDER BY `id` desc LIMIT 0, 20 OPTION max_matches=10000; SHOW META
I'm thinking it might be related. We haven't seen this types of errors for a while. Do you have any idea on how to troubleshoot this? Thanks for your help.

Are those errors occurring at times that match the deploys? In particular, the ts:restart call?

Nope. They started happening two days after.

Hrm. Can you provide a full stack-trace for the error? Also, do you have anything like monit or similar tracking the Sphinx daemon to ensure it is running? Has that caught any unexpected crashes/restarts?

We don't have anything tracking the Sphinx daemon.
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/connection.rb:93 in rescue in query
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/connection.rb:96 in query
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/connection.rb:77 in query_all
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search/batch_inquirer.rb:17 in block in results
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/connection.rb:39 in block in take
/gems/innertube-1.1.0/lib/innertube.rb:138 in take
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/connection.rb:37 in take
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search/batch_inquirer.rb:16 in results
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/middlewares/inquirer.rb:9 in block in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/logger.rb:3 in log
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/middlewares/inquirer.rb:8 in call
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/middlewares/geographer.rb:11 in call
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/middlewares/sphinxql.rb:14 in call
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/middlewares/stale_id_filter.rb:10 in call
/gems/middleware-0.1.0/lib/middleware/runner.rb:31 in call
/gems/middleware-0.1.0/lib/middleware/builder.rb:102 in call
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search.rb:67 in populate
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search.rb:46 in meta
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/masks/pagination_mask.rb:43 in total_entries
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search.rb:114 in block in method_missing
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search.rb:113 in each
/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/search.rb:113 in method_missing
app/views/headers/_basic_index.html.haml:22 in _app_views_headers__basic_index_html_haml__379323157342301923_70077981431480
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:145 in block in render
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:333 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:143 in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/partial_renderer.rb:339 in render_partial
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/partial_renderer.rb:310 in block in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/abstract_renderer.rb:39 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/abstract_renderer.rb:39 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/partial_renderer.rb:309 in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/renderer.rb:51 in render_partial
/gems/actionview-<IP_ADDRESS>/lib/action_view/helpers/rendering_helper.rb:35 in render
/gems/haml-4.0.6/lib/haml/helpers/action_view_mods.rb:10 in block in render_with_haml
/gems/haml-4.0.6/lib/haml/helpers.rb:89 in non_haml
/gems/haml-4.0.6/lib/haml/helpers/action_view_mods.rb:10 in render_with_haml
app/views/locations/index.html.haml:1 in _app_views_locations_index_html_haml___621691546003517767_70077977177080
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:145 in block in render
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:333 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/template.rb:143 in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/template_renderer.rb:54 in block (2 levels) in render_template
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/abstract_renderer.rb:39 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/abstract_renderer.rb:39 in instrument
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/template_renderer.rb:53 in block in render_template
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/template_renderer.rb:61 in render_with_layout
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/template_renderer.rb:52 in render_template
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/template_renderer.rb:14 in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/renderer.rb:46 in render_template
/gems/actionview-<IP_ADDRESS>/lib/action_view/renderer/renderer.rb:27 in render
/gems/actionview-<IP_ADDRESS>/lib/action_view/rendering.rb:100 in _render_template
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/streaming.rb:217 in _render_template
/gems/actionview-<IP_ADDRESS>/lib/action_view/rendering.rb:83 in render_to_body
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rendering.rb:32 in render_to_body
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/renderers.rb:37 in render_to_body
/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/rendering.rb:25 in render
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rendering.rb:16 in render
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:44 in block (2 levels) in render
/gems/activesupport-<IP_ADDRESS>/lib/active_support/core_ext/benchmark.rb:12 in block in ms
/usr/local/rvm/rubies/ruby-2.1.6/lib/ruby/2.1.0/benchmark.rb:294 in realtime
/gems/activesupport-<IP_ADDRESS>/lib/active_support/core_ext/benchmark.rb:12 in ms
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:44 in block in render
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:87 in cleanup_view_runtime
/gems/activerecord-<IP_ADDRESS>/lib/active_record/railties/controller_runtime.rb:25 in cleanup_view_runtime
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:43 in render
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/implicit_render.rb:10 in default_render
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/implicit_render.rb:5 in send_action
/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/base.rb:198 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rendering.rb:10 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/callbacks.rb:20 in block in process_action
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:117 in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:117 in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:555 in block (2 levels) in compile
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:505 in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:505 in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:92 in __run_callbacks__
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:778 in _run_process_action_callbacks
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:81 in run_callbacks
/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/callbacks.rb:19 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rescue.rb:29 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:32 in block in process_action
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in block in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:20 in instrument
/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:164 in instrument
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:30 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/params_wrapper.rb:250 in process_action
/gems/activerecord-<IP_ADDRESS>/lib/active_record/railties/controller_runtime.rb:18 in process_action
/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/base.rb:137 in process
/gems/actionview-<IP_ADDRESS>/lib/action_view/rendering.rb:30 in process
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal.rb:196 in dispatch
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rack_delegation.rb:13 in dispatch
/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal.rb:237 in block in action
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:74 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:74 in dispatch
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:43 in serve
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:43 in block in serve
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:30 in each
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:30 in serve
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:815 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/rack/agent_hooks.rb:30 in traced_call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/deflater.rb:35 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/warden-1.2.3/lib/warden/manager.rb:35 in block in call
/gems/warden-1.2.3/lib/warden/manager.rb:34 in catch
/gems/warden-1.2.3/lib/warden/manager.rb:34 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/etag.rb:24 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/conditionalget.rb:25 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/head.rb:13 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/params_parser.rb:27 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/flash.rb:260 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225 in context
/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/cookies.rb:560 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/activerecord-<IP_ADDRESS>/lib/active_record/query_cache.rb:36 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/activerecord-<IP_ADDRESS>/lib/active_record/connection_adapters/abstract/connection_pool.rb:653 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/callbacks.rb:29 in block in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:88 in __run_callbacks__
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:778 in _run_call_callbacks
/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:81 in run_callbacks
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/callbacks.rb:27 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/remote_ip.rb:78 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/debug_exceptions.rb:17 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/show_exceptions.rb:30 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:38 in call_app
/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:20 in block in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:68 in block in tagged
/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:26 in tagged
/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:68 in tagged
/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:20 in call
/gems/quiet_assets-1.1.0/lib/quiet_assets.rb:27 in call_with_quiet_assets
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/request_id.rb:21 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/methodoverride.rb:22 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/runtime.rb:18 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/activesupport-<IP_ADDRESS>/lib/active_support/cache/strategy/local_cache_middleware.rb:28 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/rack-1.6.4/lib/rack/sendfile.rb:113 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/gems/railties-<IP_ADDRESS>/lib/rails/engine.rb:518 in call
/gems/railties-<IP_ADDRESS>/lib/rails/application.rb:165 in call
/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:194 in public_send
/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:194 in method_missing
/gems/newrelic_rpm-<IP_ADDRESS>8/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67 in call
/usr/local/rvm/gems/ruby-2.1.6/gems/passenger-5.0.9/lib/phusion_passenger/rack/thread_handler_extension.rb:94 in process_request
/usr/local/rvm/gems/ruby-2.1.6/gems/passenger-5.0.9/lib/phusion_passenger/request_handler/thread_handler.rb:149 in accept_and_process_next_request
/usr/local/rvm/gems/ruby-2.1.6/gems/passenger-5.0.9/lib/phusion_passenger/request_handler/thread_handler.rb:110 in main_loop
/usr/local/rvm/gems/ruby-2.1.6/gems/passenger-5.0.9/lib/phusion_passenger/request_handler.rb:414 in block (3 levels) in start_threads
/usr/local/rvm/gems/ruby-2.1.6/gems/passenger-5.0.9/lib/phusion_passenger/utils.rb:111 in block in create_thread_and_abort_on_exception

Thanks for those details.
I'm not convinced this error is related to your change - perhaps it's load related and the daemon can't keep up? Is there any way you can check whether your app is under particularly highly load when these errors occur? Which version of Sphinx are you using?
I guess the daemon isn't crashing, otherwise these errors would be persisting until you ran ts:start to get it running again.

We have the practice of running ts:rebuild when this happens to fix it. Our pages display this error until we run that command. Maybe we should run rake ts:restart?
It's not load related. We don't have many users accessing it.
We're running Sphinx 2.2.6-id64-release (r4843).

Yeah, definitely worth trying ts:restart (or even just ts:start) when it next crops up. I'd also recommend looking at the Sphinx daemon logs to see if it's crashed, and perhaps there's a clue as to why.
If it's the daemon itself that is crashing (rather than the system running out of resources and killing the daemon to recover RAM), then it could be worth upgrading Sphinx - 2.2.11 has just been released, so that's what I'd recommend you try.


Module breaks AppImages xwayland?

Have been beating my head against a wall for a few days trying to triage why none of my 3d printing software works anymore under wayland (prusa-slicer, bambustudio, cura, superslicer, orca-slicer etc.), and narrowed it down to something in nixos-cosmic messing up dependencies?
The apps start for a moment and then revert segfault with
(prusa-slicer:3822): Gtk-CRITICAL **: 23:33:47.714: gtk_widget_set_size_request: assertion 'width >= -1' failed

(prusa-slicer:3822): Gtk-CRITICAL **: 23:33:47.714: gtk_widget_set_size_request: assertion 'width >= -1' failed

(prusa-slicer:3822): Gtk-CRITICAL **: 23:33:47.714: gtk_widget_set_size_request: assertion 'width >= -1' failed

(prusa-slicer:3822): Gtk-CRITICAL **: 23:33:47.714: gtk_widget_set_size_request: assertion 'width >= -1' failed

(prusa-slicer:3822): Gtk-CRITICAL **: 23:33:47.714: gtk_widget_set_size_request: assertion 'width >= -1' failed
11:33:47 PM: Debug: window wxTreeCtrl@0x571b160 ("treeCtrl") lost focus even though it didn't have it
11:33:47 PM: Debug: window wxTreeCtrl@0x571b160 ("treeCtrl") lost focus even though it didn't have it

(prusa-slicer:3822): Gdk-WARNING **: 23:33:49.869: GdkWindow 0xc00006 unexpectedly destroyed
Segmentation fault (core dumped)

These are all installed from AppImages, NixOS packaged - and I'm wondering if it has to do with either xwayland, mesa, or libwebkitgtk.
Is there anything obvious you would suggest overriding? Thank you for making this flake available! I keep seeing your name pop up in all my hobby projects hahah. nice zmk work as well:)

If there's any more info I can provide I am happy to do so

Superslicer's error:
11:44:52 PM: Debug: window wxTreeCtrl(0x347b9890) lost focus even though it didn't have it
11:44:52 PM: Debug: window wxTreeCtrl(0x347b9890) lost focus even though it didn't have it
11:44:52 PM: Debug: window wxTreeCtrl(0x347b9890) lost focus even though it didn't have it
11:44:52 PM: Debug: window wxTreeCtrl(0x347b9890) lost focus even though it didn't have it
11:44:52 PM: Debug: window wxTreeCtrl(0x346daab0) lost focus even though it didn't have it
11:44:52 PM: Debug: window wxTreeCtrl(0x346daab0) lost focus even though it didn't have it

(superslicer:7766): Gdk-ERROR **: 23:44:55.941: The program 'superslicer' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 13091 error_code 3 request_code 4 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)

https://github.com/pop-os/cosmic-epoch/issues/466
May be cosmic itself

Are you still experiencing this? I'm currently failing to replicate an issue with the listed applications or with other AppImages from nixpkgs


Error with searching Flatcar Stable AMI: Your query returned no results.

Looks like FlatCar Stable AMI images recently was deleted by owner<PHONE_NUMBER>25
Terraform output:
...
module.vault.data.aws_ami.flatcar[0]: Refreshing state...
module.vault.data.aws_availability_zones.current: Refreshing state...
module.vault.data.aws_iam_policy_document.autounseal_sts[0]: Refreshing state...

Error: Your query returned no results. Please change your search criteria and try again.

  on .terraform/modules/vault/ami.tf line 25, in data "aws_ami" "flatcar":
  25: data "aws_ami" "flatcar" {

Need replace an owner or another alternative

It seems that now is occurs change of Flatcar AMI owner, with the movement to AWS Marketplace and the next monetization


Confirmed rule not working on custom component

Versions:

VueJs: 2.5.16
Vee-Validate: 2.0.6

Description:
Confirmed rule not working on custom component.
Example:
https://codesandbox.io/s/pj88kp2240

You should add ref to the target Field. And prefix the confirmed field name
with $,  so it would look like this:
v-validate="'required|confirmed:$password'"
This is because Vue components cannot be selected by the DOM API so we use
refs instead. There are a couple of duplicate issues like this one.

Now working. Thank you @logaretm and I'm sorry for duplicate issues.
    <text-input
      ref="password"
      v-model="password"
      label="Password"
      type="password"
      v-validate="'required|min:6'"
      :error="errors.first('Password')"
    ></text-input>

    <text-input
      v-model="password_conf"
      label="Password, Again"
      type="password"
      v-validate="'required|confirmed:$password'"
      :error="errors.first('Password, Again')"
    ></text-input>

No problem, will make sure to highlight this in the docs

@martin-badin  Hey martin! I have been trying t solve my problem here and tried your solution but it's still not working. Here is my sandbox if you had any idea: https://stackoverflow.com/questions/51080690/confirmed-rule-with-veevalidate-vuejs-cant-find-the-ref ?
Any help would be much appreciated !
Thanks a lot !

@logaretm
I am having the same problem and I thought I am going to solve it with ref and $password but not working in my case. Here is my template:
<div v-for="fieldName in fields">
    <component
         v-validate="formFields[fieldName].validation"
         v-model="formData[fieldName]"
         :is="formFields[fieldName].type"
         :name="fieldName"
         :ref="fieldName"
     />
</div>

The validation object that is passed to v-validate above for passwordConfirm field is:
rules: {
    required: false,
    confirmed: '$password'
}

FieldName that is passed to :ref and :name above in the template is 'password' for password field and 'passwordConfirm' for confirm field.
I must be still missing something...

@logaretm any idea why above is not working?

I suspect the v-for loop is preventing the detection of the other field value. I recommend using the Validation Components in that case since they do not have any caveats with v-for or v-if

@logaretm, hello!
Your advice

You should add ref to the target Field. And prefix the confirmed field name with $, so it would look like this: v-validate="'required|confirmed:$password'" This is because Vue components cannot be selected by the DOM API so we use refs instead. There are a couple of duplicate issues like this one.

works in 2.0.6 version, but doesn't work now in 2.1.7.
For example, the same sandbox but I added «ref» and updated vee-validate to 2.1.7
I'll look forward to reply :)

this work for me:
v-validate="{required: true, is: modelPassword}"


[PE-D][Tester B] Add command is very strict because the user has to type out all 4 fields to insert a contact

Maybe instead of requiring users to enter all name, phone, email, address we could make it less restrictive and require just name, phone first? So if the user is in a rush they can quickly add a contact first?

Labels: severity.Medium type.FeatureFlaw
original: bgopi23/ped#7

Not allowed to fix in v1.4.


Urgent-solving problem

Hello,
I have established a model for India. I calibrated all the related data for my model and when I run the model, I get no errors until the scenario.solve ( ) line. I have attached the error. I have to present my model for a course and I am in a harsh situation.
I would appreciate if you can help me.
Regards,
Amin

Hi Amin, This kind of error is normally provided when the model is
infeasible. You can check that by looking at the GAMS output in the
terminal in which you opened the notebook. There should also be a *.lst
file that lists related errors.
On Thu, May 23, 2019 at 3:50 PM mohammadamint<EMAIL_ADDRESS>wrote:

Hello,
I have established a model for India. I calibrated all the related data
for my model and when I run the model, I get no errors until the
scenario.solve ( ) line. I have attached the error. I have to present my
model for a course and I am in a harsh situation.
I would appreciate if you can help me.
Regards,
Amin
[image: 1]
https://user-images.githubusercontent.com/50955527/58258099-64a83600-7d72-11e9-9de7-e91fd44c7b53.jpg
[image: 2]
https://user-images.githubusercontent.com/50955527/58258101-6671f980-7d72-11e9-9025-86a711e6bdea.jpg
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/iiasa/message_ix/issues/195?email_source=notifications&email_token=AAKUAEO4KUJQ4H62SXNUA4LPW2OITA5CNFSM4HPE4CIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GVO7HUA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKUAEPB3FFP3LZRJB472YLPW2OITANCNFSM4HPE4CIA
.


Contribute to the Remix plugin content for company website

Needs to be worked on by 1st week of Oct!
Deadline for publish is 12th Oct

This is now on backburner, as Mktg team currently works on a sort "blurb" which will just require an acceptance nod from devs. Once they stat working on a proper page for the website - they will need more input.


StateKey in taker-frontend is legacy

https://github.com/itchysats/itchysats/blob/f5b135f9000cfaf3db3fabf55bc81445e3bec68f/taker-frontend/src/types.ts#L224-L234
We only use the Closed variant. Can probably be optimized to something like is_final.

Obsoleted by https://github.com/itchysats/itchysats/issues/1314.


iPlayer download - 404 error on XML playlist

dauddaud@debian:~$ youtube-dl --verbose http://www.bbc.co.uk/iplayer/episode/b06vn81l/the-young-montalbano-series-2-1-the-man-who-followed-funerals
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.bbc.co.uk/iplayer/episode/b06vn81l/the-young-montalbano-series-2-1-the-man-who-followed-funerals']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.2
[debug] Proxy map: {}
[bbc.co.uk] b06vn81l: Downloading video page
[bbc.co.uk] b06vn81l: Downloading playlist XML
ERROR: Unable to download XML: HTTP Error 404: Not Found; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 203, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1231, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.


Code cleanup

@leerichard42 for your review.
Fixes #18.

@leerichard42 I added the tests as we discussed offline.  Let's merge this before #30.

Merged as part of #30.